OpenMC/tests/unit_tests/__init__.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
428 B
Python
Raw Permalink Normal View History

2019-09-05 16:30:42 -05:00
import shutil
2018-01-31 16:17:42 -06:00
import numpy as np
import pytest
2019-09-05 16:30:42 -05:00
# Check if NJOY is available
needs_njoy = pytest.mark.skipif(shutil.which('njoy') is None,
reason="NJOY not installed")
2018-01-31 16:17:42 -06:00
def assert_unbounded(obj):
"""Assert that a region/cell is unbounded."""
ll, ur = obj.bounding_box
assert ll == pytest.approx((-np.inf, -np.inf, -np.inf))
assert ur == pytest.approx((np.inf, np.inf, np.inf))