diff --git a/tests/unittests/test_butt_joint_sequence.py b/tests/unittests/test_butt_joint_sequence.py index 1be13b5c52..9608100dd4 100644 --- a/tests/unittests/test_butt_joint_sequence.py +++ b/tests/unittests/test_butt_joint_sequence.py @@ -20,14 +20,23 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. +from packaging.version import parse as parse_version import pytest -from ansys.acp.core import PrimaryPly +from ansys.acp.core import ButtJointSequence, PrimaryPly from .common.tree_object_tester import NoLockedMixin, ObjectPropertiesToTest, TreeObjectTester from .common.utils import AnyThing +@pytest.fixture(autouse=True) +def skip_if_unsupported_version(acp_instance): + if parse_version(acp_instance.server_version) < parse_version( + ButtJointSequence._SUPPORTED_SINCE + ): + pytest.skip("ButtJointSequence is not supported on this version of the server.") + + @pytest.fixture def parent_model(load_model_from_tempfile): with load_model_from_tempfile() as model: