Adding a test harness class to make sure threads are set correctly in CI.

This commit is contained in:
shriwise 2018-09-11 08:28:56 -05:00 committed by pshriwise
parent e1dde40f0a
commit 1da96b2fa6
2 changed files with 11 additions and 2 deletions

View file

@ -312,3 +312,12 @@ class HashedPyAPITestHarness(PyAPITestHarness):
def _get_results(self):
"""Digest info in the statepoint and return as a string."""
return super()._get_results(True)
class CADTestHarness(TestHarness):
def __init__(self, statepoint_name):
super(TestHarness, self).__init__(statepoint_name)
def _run_openmc(self):
openmc.run(openmc_exec=config['exe'], threads = 1)

View file

@ -1,4 +1,4 @@
from tests.testing_harness import TestHarness
from tests.testing_harness import CADTestHarness
import pytest
pytestmark = pytest.mark.skipif(
@ -6,5 +6,5 @@ pytestmark = pytest.mark.skipif(
reason="CAD build is not enabled.")
def test_cad():
harness = TestHarness('statepoint.15.h5')
harness = CADTestHarness('statepoint.15.h5')
harness.main()