Skip test in absence of UM support

This commit is contained in:
Patrick Shriwise 2022-12-27 16:34:58 -06:00
parent 251d7f5436
commit 3779c5cc4d

View file

@ -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]