Skip to content
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/changelog.d/6809.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Test_configure_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

This file was deleted.

Binary file not shown.
Binary file not shown.
5 changes: 2 additions & 3 deletions tests/system/extensions/test_configure_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -100,16 +99,16 @@ 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,
)
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)


Expand Down
4 changes: 2 additions & 2 deletions tests/system/extensions/test_export_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
from ansys.aedt.core.hfss3dlayout import Hfss3dLayout
from tests.conftest import config

AEDB_FILE_NAME = "ANSYS-HSD_V1"
TEST_SUBFOLDER = "T45"
AEDB_FILE_NAME = "Parametric_Microstrip_Simulation"
TEST_SUBFOLDER = "post_layout_design"
AEDT_FILE_PATH = Path(__file__).parent / "example_models" / TEST_SUBFOLDER / (AEDB_FILE_NAME + ".aedb")


Expand Down
4 changes: 2 additions & 2 deletions tests/system/extensions/test_post_layout_design.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def test_layout_design_toolkit_microvia(add_app, local_scratch):
file_path = Path(local_scratch.path) / "ANSYS-HSD_V1_microvia.aedb"

local_scratch.copyfolder(
Path(TESTS_EXTENSIONS_PATH) / "example_models" / "post_layout_design" / "ANSYS_SVP_V1_1_SFP.aedb",
Path(TESTS_EXTENSIONS_PATH) / "example_models" / "post_layout_design" / "Diff_Via.aedb",
file_path,
)

Expand All @@ -183,7 +183,7 @@ def test_layout_design_toolkit_microvia(add_app, local_scratch):

# Get valid padstack definition from the design
pedb = h3d.modeler.primitives.edb
available_padstacks = ["v40h20-1"]
available_padstacks = ["pad1"]
pedb.close()

# Skip test if no padstacks available
Expand Down
2 changes: 1 addition & 1 deletion tests/system/extensions/test_via_clustering.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading