diff --git a/doc/changelog.d/6809.fixed.md b/doc/changelog.d/6809.fixed.md new file mode 100644 index 00000000000..7fcbb8a6ed6 --- /dev/null +++ b/doc/changelog.d/6809.fixed.md @@ -0,0 +1 @@ +Test_configure_layout.py diff --git a/src/ansys/aedt/core/extensions/hfss3dlayout/resources/configure_layout/master_ui.py b/src/ansys/aedt/core/extensions/hfss3dlayout/resources/configure_layout/master_ui.py index 3631d897d52..f11b89fd87f 100644 --- a/src/ansys/aedt/core/extensions/hfss3dlayout/resources/configure_layout/master_ui.py +++ b/src/ansys/aedt/core/extensions/hfss3dlayout/resources/configure_layout/master_ui.py @@ -173,14 +173,15 @@ def apply_config_to_edb(self, config_path, test_folder=None): selected_edb = self.selected_edb settings.logger.info(f"target EDB: {selected_edb}") app = Edb(edbpath=str(selected_edb), edbversion=self.aedt_info.version) - app.configuration.load(config_path) - app.configuration.run() temp_dir = Path(tempfile.TemporaryDirectory(suffix=".ansys").name, dir=test_folder) temp_dir.mkdir() new_name = create_new_edb_name(Path(app.edbpath).stem) + ".aedb" app.save_as(str(temp_dir / new_name)) + app.configuration.load(config_path) + app.configuration.run() + app.save() app.close() return app.edbpath diff --git a/tests/system/extensions/test_configure_layout.py b/tests/system/extensions/test_configure_layout.py index 6f70b81115a..b7ebb701c94 100644 --- a/tests/system/extensions/test_configure_layout.py +++ b/tests/system/extensions/test_configure_layout.py @@ -35,7 +35,6 @@ from ansys.aedt.core.extensions.hfss3dlayout.resources.configure_layout.master_ui import GUIDE_LINK from ansys.aedt.core.extensions.hfss3dlayout.resources.configure_layout.master_ui import INTRO_LINK from ansys.aedt.core.extensions.hfss3dlayout.resources.configure_layout.master_ui import ConfigureLayoutExtension -from ansys.aedt.core.extensions.hfss3dlayout.resources.configure_layout.template import SERDES_CONFIG from ansys.aedt.core.internal.filesystem import Scratch @@ -100,7 +99,6 @@ def test_get_active_db(extension_under_test, test_folder, add_app): app.close_project(app.project_name) -@pytest.mark.flaky_linux @patch( "ansys.aedt.core.extensions.hfss3dlayout.configure_layout.ConfigureLayoutExtension.selected_edb", new_callable=PropertyMock, @@ -108,8 +106,9 @@ def test_get_active_db(extension_under_test, test_folder, add_app): def test_apply_config_to_edb(mock_selected_edb, test_folder, extension_under_test): mock_selected_edb.return_value = test_folder.copy_si_verse() config_path = test_folder.path / "config.json" + data = {"general": {"anti_pads_always_on": True, "suppress_pads": True}} with open(config_path, "w", encoding="utf-8") as f: - json.dump(SERDES_CONFIG, f, ensure_ascii=False, indent=4) + json.dump(data, f, ensure_ascii=False, indent=4) assert extension_under_test.apply_config_to_edb(config_path) diff --git a/tests/system/extensions/test_via_clustering.py b/tests/system/extensions/test_via_clustering.py index 92c5ac97dd1..81c1fd9d196 100644 --- a/tests/system/extensions/test_via_clustering.py +++ b/tests/system/extensions/test_via_clustering.py @@ -35,7 +35,7 @@ from tests import TESTS_EXTENSIONS_PATH -@pytest.mark.skipif(is_linux, reason="Not supported in Linux.") +@pytest.mark.flaky_linux def test_via_clustering_main_function(local_scratch): """Test the main function of the Via Clustering extension.""" # Copy test model to scratch directory