From 326eddc46987896d19976890fca36f37d711980f Mon Sep 17 00:00:00 2001 From: shriwise Date: Sat, 8 Sep 2018 11:37:42 -0500 Subject: [PATCH] Adding Python init file. --- tests/unit_tests/cad/__init__.py | 9 +++++++++ tests/unit_tests/cad/test_cad.py | 4 +--- 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 tests/unit_tests/cad/__init__.py diff --git a/tests/unit_tests/cad/__init__.py b/tests/unit_tests/cad/__init__.py new file mode 100644 index 0000000000..59a520c12a --- /dev/null +++ b/tests/unit_tests/cad/__init__.py @@ -0,0 +1,9 @@ +import numpy as np +import pytest + + +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)) diff --git a/tests/unit_tests/cad/test_cad.py b/tests/unit_tests/cad/test_cad.py index b6a8db9bd5..5df861aa1d 100644 --- a/tests/unit_tests/cad/test_cad.py +++ b/tests/unit_tests/cad/test_cad.py @@ -1,8 +1,6 @@ -import pytest - from subprocess import call def test_cad(): - assert not call(["openmc"]) + assert not call(['openmc'])