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

Update face IDs list reference in test_spatial_selection_select_faces_of_elements #719

Merged
merged 2 commits into from
Oct 10, 2024
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
4 changes: 4 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,10 @@ def license_context():
yield


SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_9_1 = meets_version(
get_server_version(core._global_server()), "9.1"
)

SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_9_0 = meets_version(
get_server_version(core._global_server()), "9.0"
)
Expand Down
11 changes: 9 additions & 2 deletions tests/test_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
from ansys.dpf import post
from ansys.dpf.post import examples
from ansys.dpf.post.selection import SpatialSelection
from conftest import SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_7_0
from conftest import (
SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_7_0,
SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_9_1,
)


def test_spatial_selection_select_nodes(allkindofcomplexity):
Expand Down Expand Up @@ -99,7 +102,11 @@ def test_spatial_selection_select_faces_of_elements(self, fluent_simulation):
)
scoping = selection._evaluate_on(fluent_simulation)
assert scoping.location == post.locations.faces
assert np.allclose(scoping.ids, [11479, 11500, -1, 11502, 11503])
if not SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_9_1:
list_ref = [11479, 11500, -1, 11502, 11503]
else:
list_ref = [12481, 12502, 39941, 43681, 12504, 12505]
assert np.allclose(scoping.ids, list_ref)


#
Expand Down
Loading