Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
roosre committed Jun 11, 2024
1 parent 90e2339 commit 2884d28
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
16 changes: 9 additions & 7 deletions tests/composite_model_scoping_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,7 @@ def test_composite_model_time_scope(dpf_server):

def test_ply_wise_scoping_in_assembly_with_imported_solid_model(dpf_server):
"""Ensure that the ply-wise scoping works in combination with the reference surface plot."""
if version_older_than(dpf_server, "9.0"):
pytest.xfail(
"The post-processing of imported solid models is supported with version 9.0 (2025 R1) or later."
)

result_folder = pathlib.Path(__file__).parent / "data" / "assemby_imported_solid_model"
result_folder = pathlib.Path(__file__).parent / "data" / "assembly_imported_solid_model"

composite_files = get_composite_files_from_workbench_result_folder(result_folder)

Expand Down Expand Up @@ -270,4 +265,11 @@ def test_ply_wise_scoping_in_assembly_with_imported_solid_model(dpf_server):
FailureOutput.MAX_SOLID_ELEMENT_ID,
]:
field = failure_result.get_field({FAILURE_LABEL: failure_output})
assert field.size == 21
if version_older_than(dpf_server, "9.0"):
# old servers do not extract the reference surface
# of imported solid models. So the reference surface mesh
# contains only the shell elements and reference surface of the
# standard solid model.
assert field.size == 12
else:
assert field.size == 21
15 changes: 8 additions & 7 deletions tests/composite_model_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,12 +555,6 @@ def test_composite_model_with_imported_solid_model_assembly(dpf_server):
The model has one shell part, one standard solid model and
an imported solid model which are all
"""
if version_older_than(dpf_server, "9.0"):
pytest.xfail(
"The post-processing of imported solid models is supported"
" with version 9.0 (2025 R1) or later."
)

result_folder = pathlib.Path(__file__).parent / "data" / "assembly_imported_solid_model"
composite_files = get_composite_files_from_workbench_result_folder(result_folder)

Expand Down Expand Up @@ -597,4 +591,11 @@ def test_composite_model_with_imported_solid_model_assembly(dpf_server):
FailureOutput.MAX_SOLID_ELEMENT_ID,
]:
field = failure_result.get_field({FAILURE_LABEL: failure_output})
assert field.size == 60
if version_older_than(dpf_server, "9.0"):
# old servers do not extract the reference surface
# of imported solid models. So the reference surface mesh
# contains only the shell elements and reference surface of the
# standard solid model.
assert field.size == 18
else:
assert field.size == 60

0 comments on commit 2884d28

Please sign in to comment.