Skip to content

Commit

Permalink
Skip new tests if the tests are run with an old server
Browse files Browse the repository at this point in the history
  • Loading branch information
roosre committed Nov 30, 2023
1 parent 7f4dcec commit c71e8f8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/ansys/dpf/composites/_composite_model_impl_2023r2.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ def get_element_info(
Parameters
----------
element_id:
Element ID or label.
Element ID/label.
composite_definition_label:
Label of the composite definition, which is the
dictionary key in the :attr:`.ContinuousFiberCompositesFiles.composite`
Expand Down
9 changes: 9 additions & 0 deletions tests/element_info_test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import pathlib
import pytest

from ansys.dpf.core import unit_systems
import numpy as np
Expand All @@ -12,6 +13,8 @@
from ansys.dpf.composites.failure_criteria import CombinedFailureCriterion, MaxStressCriterion
from ansys.dpf.composites.result_definition import FailureMeasureEnum

from ansys.dpf.composites.server_helpers import version_older_than

SEPARATOR = "::"


Expand All @@ -25,6 +28,9 @@ def test_section_definitions_from_multiple_sources(dpf_server):
the material ID from the EBLOCK must be used. The test ensures that
the element provider handles this correctly.
"""
if version_older_than(dpf_server, "8.0"):
pytest.xfail("Section data from RST is supported since server version 8.0 (2024 R2).")

TEST_DATA_ROOT_DIR = pathlib.Path(__file__).parent / "data" / "shell_mixed_acp_rst_model"

files = ContinuousFiberCompositesFiles(
Expand Down Expand Up @@ -74,6 +80,9 @@ def test_element_info_for_homogeneous_solids_and_beams(dpf_server):
Element 33 - 57: layered shells
Element 58 - 61: beams
"""
if version_older_than(dpf_server, "8.0"):
pytest.xfail("Section data from RST is supported since server version 8.0 (2024 R2).")

TEST_DATA_ROOT_DIR = pathlib.Path(__file__).parent / "data" / "model_with_beams_shells_solids"
model_name = "model_with_beams_shells_solids"
files = ContinuousFiberCompositesFiles(
Expand Down

0 comments on commit c71e8f8

Please sign in to comment.