From 3779c5cc4dc79816b0c9acf846b705b9efa2e046 Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Tue, 27 Dec 2022 16:34:58 -0600 Subject: [PATCH] Skip test in absence of UM support --- .../unstructured_mesh/source_sampling/test.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/regression_tests/unstructured_mesh/source_sampling/test.py b/tests/regression_tests/unstructured_mesh/source_sampling/test.py index 81f552698b..0188af3f10 100644 --- a/tests/regression_tests/unstructured_mesh/source_sampling/test.py +++ b/tests/regression_tests/unstructured_mesh/source_sampling/test.py @@ -97,6 +97,13 @@ def test_unstructured_mesh_sampling(model, test_cases): def test_strengths_size_failure(request, model): mesh_source = model.settings.source[0] + # skip the test if unstructured mesh is not available + if not openmc.lib._libmesh_enabled(): + if openmc.lib._dagmc_enabled(): + mesh_source.space.mesh.library = 'moab' + else: + pytest.skip("Unstructured mesh support unavailable.") + # make sure that an incorrrectly sized strengths array causes a failure mesh_source.space.strengths = mesh_source.space.strengths[:-1]