mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
Adding a test harness class to make sure threads are set correctly in CI.
This commit is contained in:
parent
e1dde40f0a
commit
1da96b2fa6
2 changed files with 11 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue