From eed36b2b92a9aaf206ade6c3f7871969d3cdbae6 Mon Sep 17 00:00:00 2001 From: Robin Andersson Date: Thu, 20 Feb 2025 10:27:01 -0500 Subject: [PATCH] Updated init test to also use reset and terminate --- tests/test_fmi3.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/test_fmi3.py b/tests/test_fmi3.py index 10168452..24cb8916 100644 --- a/tests/test_fmi3.py +++ b/tests/test_fmi3.py @@ -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",