diff --git a/openmc/capi/__init__.py b/openmc/capi/__init__.py index 95ac77a64..1015df216 100644 --- a/openmc/capi/__init__.py +++ b/openmc/capi/__init__.py @@ -38,8 +38,11 @@ else: from unittest.mock import Mock _dll = Mock() -dagmc_enabled = bool(c_bool.in_dll(_dll, "dagmc_enabled")) - + +def _dagmc_enabled(): + return c_bool.in_dll(_dll, "dagmc_enabled").value + + from .error import * from .core import * from .nuclide import * diff --git a/tests/regression_tests/dagmc/test.py b/tests/regression_tests/dagmc/test.py index 6db936d12..9766c9732 100644 --- a/tests/regression_tests/dagmc/test.py +++ b/tests/regression_tests/dagmc/test.py @@ -6,7 +6,7 @@ import pytest from tests.testing_harness import PyAPITestHarness pytestmark = pytest.mark.skipif( - not openmc.capi.dagmc_enabled, + not openmc.capi._dagmc_enabled(), reason="DAGMC CAD geometry is not enabled.") def test_dagmc(): @@ -22,7 +22,7 @@ def test_dagmc(): model.settings.source = source model.settings.dagmc = True - + # tally tally = openmc.Tally() tally.scores = ['total']