Skip to content

Commit

Permalink
Updated init test to also use reset and terminate
Browse files Browse the repository at this point in the history
  • Loading branch information
modelonrobinandersson committed Feb 20, 2025
1 parent 90e950a commit eed36b2
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tests/test_fmi3.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,17 @@ def test_instantiation(self, tmpdir):
FMI3_REF_FMU_PATH / "Stair.fmu",
FMI3_REF_FMU_PATH / "VanDerPol.fmu",
])
def test_initialize(self, ref_fmu):
"""Test initialize all the ME reference FMUs. """
def test_initialize_reset_terminate(self, ref_fmu):
"""Test initialize, reset and terminate of all the ME reference FMUs. """
fmu = load_fmu(ref_fmu)
fmu.initialize() # Should simply pass without any exceptions
# Should simply pass without any exceptions
fmu.initialize()
fmu.reset()

# Test initialize again after resetting followed by terminate,
# since terminating does not require reset.
fmu.initialize()
fmu.terminate()

@pytest.mark.parametrize("ref_fmu", [
FMI3_REF_FMU_PATH / "BouncingBall.fmu",
Expand Down

0 comments on commit eed36b2

Please sign in to comment.