OpenMC/tests/regression_tests/statepoint_sourcesep/test.py

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

26 lines
703 B
Python
Raw Permalink Normal View History

2015-09-14 21:42:25 -04:00
import glob
import os
from tests.testing_harness import TestHarness
class SourcepointTestHarness(TestHarness):
def _test_output_created(self):
"""Make sure statepoint.* and source* have been created."""
TestHarness._test_output_created(self)
source = glob.glob('source.*.h5')
assert len(source) == 1, 'Either multiple or no source files ' \
'exist.'
2015-09-14 21:05:58 -04:00
def _cleanup(self):
TestHarness._cleanup(self)
output = glob.glob('source.*.h5')
2015-09-14 21:05:58 -04:00
for f in output:
if os.path.exists(f):
os.remove(f)
2014-02-25 13:21:54 -05:00
def test_statepoint_sourcesep():
harness = SourcepointTestHarness('statepoint.10.h5')
harness.main()