mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 21:25:36 -04:00
Remove remnants of binary files
This commit is contained in:
parent
6d3199b7ab
commit
04aecbcb94
9 changed files with 22 additions and 29 deletions
|
|
@ -5,6 +5,6 @@
|
|||
# folders. This can occur if a previous error
|
||||
# occurred and the test suite was rerun without
|
||||
# deleting left over binary files. This will
|
||||
# cause an assertion error in some of the
|
||||
# cause an assertion error in some of the
|
||||
# tests.
|
||||
find . \( -name "*.binary" -o -name "*.h5" -o -name "*.ppm" \) -exec rm -f {} \;
|
||||
find . \( -name "*.h5" -o -name "*.ppm" \) -exec rm -f {} \;
|
||||
|
|
|
|||
|
|
@ -67,9 +67,8 @@ class DistribcellTestHarness(TestHarness):
|
|||
statepoint = glob.glob(os.path.join(os.getcwd(), self._sp_name))
|
||||
assert len(statepoint) == 1, 'Either multiple or no statepoint files ' \
|
||||
'exist.'
|
||||
assert statepoint[0].endswith('binary') \
|
||||
or statepoint[0].endswith('h5'), \
|
||||
'Statepoint file is not a binary or hdf5 file.'
|
||||
assert statepoint[0].endswith('h5'), \
|
||||
'Statepoint file is not a HDF5 file.'
|
||||
if tallies_out_present:
|
||||
assert os.path.exists(os.path.join(os.getcwd(), 'tallies.out')), \
|
||||
'Tally output file does not exist.'
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ class OutputTestHarness(TestHarness):
|
|||
# Check for the summary.
|
||||
summary = glob.glob(os.path.join(os.getcwd(), 'summary.*'))
|
||||
assert len(summary) == 1, 'Either multiple or no summary file exists.'
|
||||
assert summary[0].endswith('out') or summary[0].endswith('h5'),\
|
||||
'Summary file is not a binary or hdf5 file.'
|
||||
assert summary[0].endswith('h5'),\
|
||||
'Summary file is not a HDF5 file.'
|
||||
|
||||
# Check for the cross sections.
|
||||
assert os.path.exists(os.path.join(os.getcwd(), 'cross_sections.out')),\
|
||||
|
|
|
|||
|
|
@ -66,15 +66,13 @@ class SourceFileTestHarness(TestHarness):
|
|||
statepoint = glob.glob(os.path.join(os.getcwd(), self._sp_name))
|
||||
assert len(statepoint) == 1, 'Either multiple or no statepoint files ' \
|
||||
'exist.'
|
||||
assert statepoint[0].endswith('binary') \
|
||||
or statepoint[0].endswith('h5'), \
|
||||
'Statepoint file is not a binary or hdf5 file.'
|
||||
assert statepoint[0].endswith('h5'), \
|
||||
'Statepoint file is not a HDF5 file.'
|
||||
|
||||
source = glob.glob(os.path.join(os.getcwd(), 'source.10.*'))
|
||||
assert len(source) == 1, 'Either multiple or no source files exist.'
|
||||
assert source[0].endswith('binary') \
|
||||
or source[0].endswith('h5'), \
|
||||
'Source file is not a binary or hdf5 file.'
|
||||
assert source[0].endswith('h5'), \
|
||||
'Source file is not a HDF5 file.'
|
||||
|
||||
def _run_openmc_restart(self):
|
||||
# Get the name of the source file.
|
||||
|
|
|
|||
|
|
@ -9,10 +9,9 @@ class SourcepointTestHarness(TestHarness):
|
|||
def _test_output_created(self):
|
||||
"""Make sure statepoint.* files have been created."""
|
||||
statepoint = glob.glob(os.path.join(os.getcwd(), 'statepoint.*'))
|
||||
assert len(statepoint) == 5, '5 statepoint files must exist.'
|
||||
assert statepoint[0].endswith('binary') \
|
||||
or statepoint[0].endswith('h5'), \
|
||||
'Statepoint file is not a binary or hdf5 file.'
|
||||
assert len(statepoint) == 5, '5 statepoint files must exist.'
|
||||
assert statepoint[0].endswith('h5'), \
|
||||
'Statepoint file is not a HDF5 file.'
|
||||
|
||||
def _get_results(self):
|
||||
"""Digest info in the statepoint and return as a string."""
|
||||
|
|
|
|||
|
|
@ -9,10 +9,9 @@ class SourcepointTestHarness(TestHarness):
|
|||
def _test_output_created(self):
|
||||
"""Make sure statepoint.* files have been created."""
|
||||
statepoint = glob.glob(os.path.join(os.getcwd(), 'statepoint.*'))
|
||||
assert len(statepoint) == 5, '5 statepoint files must exist.'
|
||||
assert statepoint[0].endswith('binary') \
|
||||
or statepoint[0].endswith('h5'), \
|
||||
'Statepoint file is not a binary or hdf5 file.'
|
||||
assert len(statepoint) == 5, '5 statepoint files must exist.'
|
||||
assert statepoint[0].endswith('h5'), \
|
||||
'Statepoint file is not a HDF5 file.'
|
||||
|
||||
def _get_results(self):
|
||||
"""Digest info in the statepoint and return as a string."""
|
||||
|
|
|
|||
|
|
@ -12,9 +12,8 @@ class SourcepointTestHarness(TestHarness):
|
|||
source = glob.glob(os.path.join(os.getcwd(), 'source.*'))
|
||||
assert len(source) == 1, 'Either multiple or no source files ' \
|
||||
'exist.'
|
||||
assert source[0].endswith('binary') \
|
||||
or source[0].endswith('h5'), \
|
||||
'Source file is not a binary or hdf5 file.'
|
||||
assert source[0].endswith('h5'), \
|
||||
'Source file is not a HDF5 file.'
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
|||
|
|
@ -12,9 +12,8 @@ class SourcepointTestHarness(TestHarness):
|
|||
source = glob.glob(os.path.join(os.getcwd(), 'source.*'))
|
||||
assert len(source) == 1, 'Either multiple or no source files ' \
|
||||
'exist.'
|
||||
assert source[0].endswith('binary') \
|
||||
or source[0].endswith('h5'), \
|
||||
'Source file is not a binary or hdf5 file.'
|
||||
assert source[0].endswith('h5'), \
|
||||
'Source file is not a HDF5 file.'
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@ class TrackTestHarness(TestHarness):
|
|||
outputs.append(glob.glob(''.join((os.getcwd(), '/track_1_1_2.*'))))
|
||||
for files in outputs:
|
||||
assert len(files) == 1, 'Multiple or no track files detected.'
|
||||
assert files[0].endswith('binary') or files[0].endswith('h5'),\
|
||||
'Track files are not binary or hdf5 files'
|
||||
assert files[0].endswith('h5'),\
|
||||
'Track files are not HDF5 files'
|
||||
|
||||
def _get_results(self):
|
||||
"""Digest info in the statepoint and return as a string."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue