From f60a34bf4c7bfc29bf4cb5a4a5559e588d17d825 Mon Sep 17 00:00:00 2001 From: Christian Henkel Date: Wed, 19 Jun 2024 16:51:21 +0200 Subject: [PATCH] making sure to not use an old test product by accident Signed-off-by: Christian Henkel --- jani_generator/test/test_systemtest_scxml_to_jani.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/jani_generator/test/test_systemtest_scxml_to_jani.py b/jani_generator/test/test_systemtest_scxml_to_jani.py index ff30cffb..19f7c1a1 100644 --- a/jani_generator/test/test_systemtest_scxml_to_jani.py +++ b/jani_generator/test/test_systemtest_scxml_to_jani.py @@ -218,13 +218,15 @@ def test_with_entrypoint_main_ros(self): def test_with_entrypoint_main_ros_w_bt(self): test_data_dir = os.path.join( os.path.dirname(__file__), '_test_data', 'ros_example_w_bt') - xml_main_path = os.path.join(test_data_dir, 'main.xml') ouput_path = os.path.join(test_data_dir, 'main.jani') + if os.path.exists(ouput_path): + os.remove(ouput_path) + xml_main_path = os.path.join(test_data_dir, 'main.xml') if os.path.exists(ouput_path): os.remove(ouput_path) interpret_top_level_xml(xml_main_path) self.assertTrue(os.path.exists(ouput_path)) - + os.remove(ouput_path) if __name__ == '__main__':