mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Skip tests if libraries are not enabled
This commit is contained in:
parent
60a2a0e1f8
commit
251d7f5436
2 changed files with 7 additions and 0 deletions
|
|
@ -81,6 +81,12 @@ for i, lib, in enumerate(['libmesh', 'moab']):
|
|||
|
||||
@pytest.mark.parametrize("test_cases", test_cases, ids=lambda p: p['library'])
|
||||
def test_unstructured_mesh_sampling(model, test_cases):
|
||||
# skip the test if the library is not enabled
|
||||
if test_cases['library'] == 'moab' and not openmc.lib._dagmc_enabled():
|
||||
pytest.skip("DAGMC (and MOAB) mesh not enabled in this build.")
|
||||
|
||||
if test_cases['library'] == 'libmesh' and not openmc.lib._libmesh_enabled():
|
||||
pytest.skip("LibMesh is not enabled in this build.")
|
||||
|
||||
model.settings.source[0].space.mesh.libaray = test_cases['library']
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ from tests import cdtemp
|
|||
from tests.regression_tests import config
|
||||
from subprocess import call
|
||||
|
||||
|
||||
TETS_PER_VOXEL = 12
|
||||
|
||||
# This test uses a geometry file with cells that match a regular mesh. Each cell
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue