Skip to content
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

CHORE: refacto maxwell test #5601

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
4 changes: 4 additions & 0 deletions src/ansys/aedt/core/maxwell.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,10 @@
>>> oModule.SetEddyEffect
"""
solid_objects_names = self.get_all_conductors_names()
if not solid_objects_names:
self.logger.error("No conductors defined in active design.")
return False
assignment = self.modeler.convert_to_selections(assignment, True)

Check warning on line 555 in src/ansys/aedt/core/maxwell.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/aedt/core/maxwell.py#L552-L555

Added lines #L552 - L555 were not covered by tests

EddyVector = ["NAME:EddyEffectVector"]
if self.modeler._is3d:
Expand Down
2 changes: 0 additions & 2 deletions src/ansys/aedt/core/modules/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -1157,7 +1157,6 @@ def assign_length_mesh(self, assignment, inside_selection=True, maximum_length=1
if maximum_length is None and maximum_elements is None:
self.logger.error("mesh not assigned due to incorrect settings")
return
assignment = self._app.modeler.convert_to_selections(assignment, True)

if isinstance(assignment[0], int) and not inside_selection:
seltype = "Faces"
Expand Down Expand Up @@ -1317,7 +1316,6 @@ def assign_curvilinear_elements(self, assignment, enable=True, name=None):
name = generate_unique_name(name)
else:
name = generate_unique_name("CurvilinearElements")
assignment = self._app.modeler.convert_to_selections(assignment, True)

if isinstance(assignment[0], int):
seltype = "Faces"
Expand Down
1 change: 0 additions & 1 deletion tests/system/general/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@
# Initialize default desktop configuration
default_version = "2024.2"


if inside_desktop and "oDesktop" in dir(sys.modules["__main__"]):
default_version = sys.modules["__main__"].oDesktop.GetVersion()[0:6]
config = {
Expand Down
Loading
Loading