Skip to content

Commit 89083c3

Browse files
authored
Merge branch 'master' into doc/edit_support_email
2 parents 127ba25 + 9647d1e commit 89083c3

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

src/ansys/dpf/core/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ def _load_result_info(self):
416416
result_info = op.get_output(0, types.result_info)
417417
except Exception as e:
418418
# give the user a more helpful error
419-
if "results file is not defined in the Data sources" in e.args():
419+
if "results file is not defined in the Data sources" in e.args:
420420
raise RuntimeError("Unable to open result file") from None
421421
else:
422422
raise e

tests/conftest.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,9 @@ def cyclic_multistage():
210210
return examples.download_multi_stage_cyclic_result()
211211

212212

213+
SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_6_2 = meets_version(
214+
get_server_version(core._global_server()), "6.2"
215+
)
213216
SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_6_1 = meets_version(
214217
get_server_version(core._global_server()), "6.1"
215218
)

tests/test_operator.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_3_0,
1818
SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_4_0,
1919
SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_5_0,
20+
SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_6_2,
2021
)
2122

2223
# Check for ANSYS installation env var
@@ -1233,7 +1234,12 @@ def test_operator_config_specification_simple(server_type):
12331234
spec = Specification(operator_name="add", server=server_type)
12341235
conf_spec = spec.config_specification
12351236
if server_type.os != "posix":
1236-
assert "enum dataProcessing::EBinaryOperation" in conf_spec["binary_operation"].type_names
1237+
assert (
1238+
"enum dataProcessing::EBinaryOperation"
1239+
or "binary_operation_enum" in conf_spec["binary_operation"].type_names
1240+
)
1241+
elif SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_6_2:
1242+
assert "binary_operation_enum" in conf_spec["binary_operation"].type_names
12371243
assert conf_spec["binary_operation"].default_value_str == "1"
12381244
assert "Intersection" in conf_spec["binary_operation"].document
12391245
assert "run_in_parallel" in conf_spec
@@ -1246,7 +1252,12 @@ def test_generated_operator_config_specification_simple(server_type):
12461252
spec = op.specification
12471253
conf_spec = spec.config_specification
12481254
if server_type.os != "posix":
1249-
assert "enum dataProcessing::EBinaryOperation" in conf_spec["binary_operation"].type_names
1255+
assert (
1256+
"enum dataProcessing::EBinaryOperation"
1257+
or "binary_operation_enum" in conf_spec["binary_operation"].type_names
1258+
)
1259+
elif SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_6_2:
1260+
assert "binary_operation_enum" in conf_spec["binary_operation"].type_names
12501261
assert conf_spec["binary_operation"].default_value_str == "1"
12511262
assert "Intersection" in conf_spec["binary_operation"].document
12521263
assert "run_in_parallel" in conf_spec

0 commit comments

Comments
 (0)