From 1befe1c059c23c0d5a45fa063474f6df21cf68f3 Mon Sep 17 00:00:00 2001 From: shriwise Date: Sat, 8 Sep 2018 14:51:44 -0500 Subject: [PATCH] More updates to CAD test. Attempt at skip if DAGMC is not enabled. Attempting to add local directory to path. --- tests/unit_tests/cad/test_cad.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/tests/unit_tests/cad/test_cad.py b/tests/unit_tests/cad/test_cad.py index ccd874c3c7..544e87380c 100644 --- a/tests/unit_tests/cad/test_cad.py +++ b/tests/unit_tests/cad/test_cad.py @@ -1,6 +1,20 @@ from subprocess import call +import os +import sys + + +import pytest +pytestmark = pytest.mark.skipif( + os.environ.get('CAD') != 'y', + reason="CAD build is not enabled.") + def test_cad(): - assert not call(['openmc -s 1']) + # make sure cwd is in the python system path + d = os.path.abspath(os.path.dirname(__file__)) + print(d) + sys.path.append(d) + + assert not call(['openmc','-s','1'])