Skip to content

Commit f89c9ad

Browse files
authored
Update face IDs list reference in test_spatial_selection_select_faces_of_elements (#719)
* Update face IDs list reference in test_spatial_selection_select_faces_of_elements after bug fix on mesh_from_scoping * Fix retro
1 parent a002474 commit f89c9ad

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

tests/conftest.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,10 @@ def license_context():
222222
yield
223223

224224

225+
SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_9_1 = meets_version(
226+
get_server_version(core._global_server()), "9.1"
227+
)
228+
225229
SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_9_0 = meets_version(
226230
get_server_version(core._global_server()), "9.0"
227231
)

tests/test_selection.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
from ansys.dpf import post
77
from ansys.dpf.post import examples
88
from ansys.dpf.post.selection import SpatialSelection
9-
from conftest import SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_7_0
9+
from conftest import (
10+
SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_7_0,
11+
SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_9_1,
12+
)
1013

1114

1215
def test_spatial_selection_select_nodes(allkindofcomplexity):
@@ -99,7 +102,11 @@ def test_spatial_selection_select_faces_of_elements(self, fluent_simulation):
99102
)
100103
scoping = selection._evaluate_on(fluent_simulation)
101104
assert scoping.location == post.locations.faces
102-
assert np.allclose(scoping.ids, [11479, 11500, -1, 11502, 11503])
105+
if not SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_9_1:
106+
list_ref = [11479, 11500, -1, 11502, 11503]
107+
else:
108+
list_ref = [12481, 12502, 39941, 43681, 12504, 12505]
109+
assert np.allclose(scoping.ids, list_ref)
103110

104111

105112
#

0 commit comments

Comments
 (0)