Skip to content

REFACTOR: Refactor/12 post processing test #6095

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
May 14, 2025
Merged
Show file tree
Hide file tree
Changes from all 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/6051.miscellaneous.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
12_post_processing refactoring
1 change: 1 addition & 0 deletions doc/changelog.d/6095.miscellaneous.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Refactor/12 post processing test
4 changes: 4 additions & 0 deletions src/ansys/aedt/core/application/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,10 @@
excitations = self.oboundary.GetNumExcitations("SignalLine")
elif self.design_type == "Q3D Extractor":
excitations = self.oboundary.GetNumExcitations("Source")
elif self.design_type == "Maxwell 3D":
excitations = self.oboundary.GetNumExcitations()

Check warning on line 870 in src/ansys/aedt/core/application/analysis.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/aedt/core/application/analysis.py#L870

Added line #L870 was not covered by tests
elif self.design_type == "Maxwell 2D":
excitations = self.oboundary.GetNumExcitations()

Check warning on line 872 in src/ansys/aedt/core/application/analysis.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/aedt/core/application/analysis.py#L872

Added line #L872 was not covered by tests
elif self.design_type == "Circuit Design":
excitations = len(self.excitation_names)
else:
Expand Down
Binary file not shown.
13 changes: 13 additions & 0 deletions tests/system/solvers/test_01_pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
tol = 1e-12
test_project_name = "ANSYS-HSD_V1_0_test"
test_subfolder = "T01"
test_circuit_name = "Switching_Speed_FET_And_Diode_Solved"


@pytest.fixture(scope="class")
Expand All @@ -45,6 +46,13 @@ def aedtapp(add_app):
return app


@pytest.fixture()
def circuit_test(add_app):
app = add_app(project_name=test_circuit_name, design_name="Diode", application=Circuit, subfolder=test_subfolder)
yield app
app.close_project(save=False)


class TestClass(object):
def test_create_pdf(self, local_scratch):
report = AnsysReport(design_name="Design1", project_name="Coaxial")
Expand Down Expand Up @@ -73,6 +81,11 @@ def test_create_pdf(self, local_scratch):
report.add_toc()
assert os.path.exists(report.save_pdf(local_scratch.path, "my_firstpdf.pdf"))

def test_create_pdf_schematic(self, circuit_test):
report = AnsysReport()
report.create()
assert report.add_project_info(circuit_test)

def test_virtual_compliance(self, local_scratch, aedtapp):
template = os.path.join(
local_path, "example_models", test_subfolder, "compliance", "general_compliance_template.json"
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion tests/system/visualization/test_12_1_PostProcessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
from tests.system.visualization.conftest import config

test_project_name = "coax_setup_solved_231"
m2d_trace_export_table = "m2d_trace_export_table"
m2d_trace_export_table = "m2d"


test_circuit_name = "Switching_Speed_FET_And_Diode"
Expand Down
Loading
Loading