mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
using os.path.join to join paths instead of string concatenation
This commit is contained in:
parent
3ad1bd2f20
commit
92dce0b83b
75 changed files with 390 additions and 390 deletions
|
|
@ -144,7 +144,7 @@ class Test(object):
|
|||
if os.path.isfile(self.fc):
|
||||
result = True
|
||||
for path in os.environ["PATH"].split(":"):
|
||||
if os.path.isfile(path + "/" + self.fc):
|
||||
if os.path.isfile(os.path.join(path, self.fc)):
|
||||
result = True
|
||||
if not result:
|
||||
raise Exception("Compiler path '{0}' does not exist."
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -38,8 +38,8 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,18 +24,18 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.20.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.20.*'))
|
||||
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.'
|
||||
|
||||
|
||||
def test_output_exists():
|
||||
assert os.path.exists(cwd + '/tallies.out'), 'Tally output file does not exist.'
|
||||
assert os.path.exists(os.path.join(cwd,'tallies.out')), 'Tally output file does not exist.'
|
||||
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.20.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.20.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -44,9 +44,9 @@ def test_results():
|
|||
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.20.*')
|
||||
output.append(cwd + '/tallies.out')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.20.*'))
|
||||
output.append(os.path.join(cwd,'tallies.out'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -25,18 +25,18 @@ def test_run():
|
|||
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.20.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.20.*'))
|
||||
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.'
|
||||
|
||||
|
||||
def test_output_exists():
|
||||
assert os.path.exists(cwd + '/tallies.out'), 'Tally output file does not exist.'
|
||||
assert os.path.exists(os.path.join(cwd,'tallies.out')), 'Tally output file does not exist.'
|
||||
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.20.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.20.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -45,9 +45,9 @@ def test_results():
|
|||
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.20.*')
|
||||
output.append(cwd + '/tallies.out')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.20.*'))
|
||||
output.append(os.path.join(cwd,'tallies.out'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -25,18 +25,18 @@ def test_run():
|
|||
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.20.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.20.*'))
|
||||
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.'
|
||||
|
||||
|
||||
def test_output_exists():
|
||||
assert os.path.exists(cwd + '/tallies.out'), 'Tally output file does not exist.'
|
||||
assert os.path.exists(os.path.join(cwd,'tallies.out')), 'Tally output file does not exist.'
|
||||
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.20.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.20.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -45,9 +45,9 @@ def test_results():
|
|||
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.20.*')
|
||||
output.append(cwd + '/tallies.out')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.20.*'))
|
||||
output.append(os.path.join(cwd,'tallies.out'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,16 +24,16 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_created_output():
|
||||
assert os.path.exists(cwd + '/tallies.out'), 'Tally output file does not exist.'
|
||||
assert os.path.exists(os.path.join(cwd,'tallies.out')), 'Tally output file does not exist.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -41,9 +41,9 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output.append(cwd + '/tallies.out')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
output.append(os.path.join(cwd,'tallies.out'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -38,8 +38,8 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -39,7 +39,7 @@ def test_results():
|
|||
|
||||
def teardown():
|
||||
output = glob.glob('statepoint.10.*')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -38,8 +38,8 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
|
@ -38,8 +38,8 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.7.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.7.*'))
|
||||
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.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.7.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.7.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -38,8 +38,8 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.7.*')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.7.*'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -38,8 +38,8 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -38,8 +38,8 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -25,13 +25,13 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -39,8 +39,8 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,16 +24,16 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_output_exists():
|
||||
assert os.path.exists(cwd + '/tallies.out'), 'Tally output file does not exist.'
|
||||
assert os.path.exists(os.path.join(cwd,'tallies.out')), 'Tally output file does not exist.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -41,9 +41,9 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/tallies.out')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'tallies.out'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
|
||||
def test_output_exists():
|
||||
assert os.path.exists(cwd + '/tallies.out'), 'Tally output file does not exist.'
|
||||
assert os.path.exists(os.path.join(cwd,'tallies.out')), 'Tally output file does not exist.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -38,9 +38,9 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/tallies.out')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'tallies.out'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,16 +24,16 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_output_exists():
|
||||
assert os.path.exists(cwd + '/tallies.out'), 'Tally output file does not exist.'
|
||||
assert os.path.exists(os.path.join(cwd,'tallies.out')), 'Tally output file does not exist.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -41,9 +41,9 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/tallies.out')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'tallies.out'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,16 +24,16 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_output_exists():
|
||||
assert os.path.exists(cwd + '/tallies.out'), 'Tally output file does not exist.'
|
||||
assert os.path.exists(os.path.join(cwd,'tallies.out')), 'Tally output file does not exist.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -41,9 +41,9 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/tallies.out')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'tallies.out'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,16 +24,16 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_output_exists():
|
||||
assert os.path.exists(cwd + '/tallies.out'), 'Tally output file does not exist.'
|
||||
assert os.path.exists(os.path.join(cwd,'tallies.out')), 'Tally output file does not exist.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -41,9 +41,9 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/tallies.out')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'tallies.out'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,16 +24,16 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_output_exists():
|
||||
assert os.path.exists(cwd + '/tallies.out'), 'Tally output file does not exist.'
|
||||
assert os.path.exists(os.path.join(cwd,'tallies.out')), 'Tally output file does not exist.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -41,9 +41,9 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/tallies.out')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'tallies.out'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,16 +24,16 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_output_exists():
|
||||
assert os.path.exists(cwd + '/tallies.out'), 'Tally output file does not exist.'
|
||||
assert os.path.exists(os.path.join(cwd,'tallies.out')), 'Tally output file does not exist.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -41,9 +41,9 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/tallies.out')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'tallies.out'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,16 +24,16 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_output_exists():
|
||||
assert os.path.exists(cwd + '/tallies.out'), 'Tally output file does not exist.'
|
||||
assert os.path.exists(os.path.join(cwd,'tallies.out')), 'Tally output file does not exist.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -41,9 +41,9 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/tallies.out')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'tallies.out'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,16 +24,16 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_output_exists():
|
||||
assert os.path.exists(cwd + '/tallies.out'), 'Tally output file does not exist.'
|
||||
assert os.path.exists(os.path.join(cwd,'tallies.out')), 'Tally output file does not exist.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -41,9 +41,9 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/tallies.out')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'tallies.out'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,16 +24,16 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_output_exists():
|
||||
assert os.path.exists(cwd + '/tallies.out'), 'Tally output file does not exist.'
|
||||
assert os.path.exists(os.path.join(cwd,'tallies.out')), 'Tally output file does not exist.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -41,9 +41,9 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/tallies.out')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'tallies.out'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -38,8 +38,8 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -38,8 +38,8 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -38,8 +38,8 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,23 +24,23 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_summary_exists():
|
||||
summary = glob.glob(cwd + '/summary.*')
|
||||
summary = glob.glob(os.path.join(cwd,'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.'
|
||||
|
||||
def test_cross_sections_exists():
|
||||
assert os.path.exists(cwd + '/cross_sections.out'),\
|
||||
assert os.path.exists(os.path.join(cwd, 'cross_sections.out')),\
|
||||
'Cross section output file does not exist.'
|
||||
|
||||
def test_statepoint_exists():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -48,10 +48,10 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*') + glob.glob(cwd + '/summary.*')
|
||||
output.append(cwd + '/summary.out')
|
||||
output.append(cwd + '/cross_sections.out')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*')) + glob.glob(os.path.join(cwd,'summary.*'))
|
||||
output.append(os.path.join(cwd,'summary.out'))
|
||||
output.append(os.path.join(cwd, 'cross_sections.out'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_restart():
|
||||
particle = glob.glob(cwd + '/particle_10_394.*')
|
||||
particle = glob.glob(os.path.join(cwd, 'particle_10_394.*'))
|
||||
assert len(particle) == 1, 'Either multiple or no particle restart files exist.'
|
||||
assert particle[0].endswith('binary') or \
|
||||
particle[0].endswith('h5'), 'Particle restart file not a binary or hdf5 file.'
|
||||
|
||||
def test_results():
|
||||
particle = glob.glob(cwd + '/particle_10_394.*')
|
||||
particle = glob.glob(os.path.join(cwd, 'particle_10_394.*'))
|
||||
call(['python', 'results.py', particle[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -38,15 +38,15 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def test_run_restart():
|
||||
particle = glob.glob(cwd + '/particle_10_394.*')
|
||||
particle = glob.glob(os.path.join(cwd, 'particle_10_394.*'))
|
||||
proc = Popen([opts.exe, '-r', particle[0], cwd], stderr=PIPE, stdout=PIPE)
|
||||
stdout, stderr = proc.communicate()
|
||||
assert stderr == '', 'Particle restart not successful.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.*') + \
|
||||
glob.glob(cwd + '/particle_*') + \
|
||||
[cwd + '/results_test.dat']
|
||||
output = glob.glob(os.path.join(cwd, 'statepoint.*')) + \
|
||||
glob.glob(os.path.join(cwd, 'particle_*')) + \
|
||||
[os.path.join(cwd,'results_test.dat')]
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -22,10 +22,10 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_plot_exists():
|
||||
assert os.path.exists(cwd + '/1_plot.ppm'), 'Plot ppm file does not exist.'
|
||||
assert os.path.exists(os.path.join(cwd ,'1_plot.ppm')), 'Plot ppm file does not exist.'
|
||||
|
||||
def teardown():
|
||||
output = [cwd + '/1_plot.ppm']
|
||||
output = [os.path.join(cwd ,'1_plot.ppm')]
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -22,12 +22,12 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_plots_exists():
|
||||
assert os.path.exists(cwd + '/1_plot.ppm'), 'Plot 1 result does not exist.'
|
||||
assert os.path.exists(cwd + '/2_plot.ppm'), 'Plot 2 result does not exist.'
|
||||
assert os.path.exists(cwd + '/3_plot.ppm'), 'Plot 3 result does not exist.'
|
||||
assert os.path.exists(os.path.join(cwd ,'1_plot.ppm')), 'Plot 1 result does not exist.'
|
||||
assert os.path.exists(os.path.join(cwd ,'2_plot.ppm')), 'Plot 2 result does not exist.'
|
||||
assert os.path.exists(os.path.join(cwd ,'3_plot.ppm')), 'Plot 3 result does not exist.'
|
||||
|
||||
def teardown():
|
||||
output = [cwd + '/1_plot.ppm', cwd + '/2_plot.ppm', cwd + '/3_plot.ppm']
|
||||
output = [os.path.join(cwd ,'1_plot.ppm'), os.path.join(cwd ,'2_plot.ppm'), os.path.join(cwd ,'3_plot.ppm')]
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -22,10 +22,10 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_plot_exists():
|
||||
assert os.path.exists(cwd + '/1_plot.ppm'), 'Plot ppm file does not exist.'
|
||||
assert os.path.exists(os.path.join(cwd ,'1_plot.ppm')), 'Plot ppm file does not exist.'
|
||||
|
||||
def teardown():
|
||||
output = [cwd + '/1_plot.ppm']
|
||||
output = [os.path.join(cwd ,'1_plot.ppm')]
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -22,12 +22,12 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_plots_exists():
|
||||
assert os.path.exists(cwd + '/1_plot.ppm'), 'Plot 1 result does not exist.'
|
||||
assert os.path.exists(cwd + '/2_plot.ppm'), 'Plot 2 result does not exist.'
|
||||
assert os.path.exists(cwd + '/3_plot.ppm'), 'Plot 3 result does not exist.'
|
||||
assert os.path.exists(os.path.join(cwd ,'1_plot.ppm')), 'Plot 1 result does not exist.'
|
||||
assert os.path.exists(os.path.join(cwd ,'2_plot.ppm')), 'Plot 2 result does not exist.'
|
||||
assert os.path.exists(os.path.join(cwd ,'3_plot.ppm')), 'Plot 3 result does not exist.'
|
||||
|
||||
def teardown():
|
||||
output = [cwd + '/1_plot.ppm', cwd + '/2_plot.ppm', cwd + '/3_plot.ppm']
|
||||
output = [os.path.join(cwd ,'1_plot.ppm'), os.path.join(cwd ,'2_plot.ppm'), os.path.join(cwd ,'3_plot.ppm')]
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -38,8 +38,8 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -38,8 +38,8 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -38,8 +38,8 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -38,8 +38,8 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -38,8 +38,8 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -38,8 +38,8 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -38,8 +38,8 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -38,8 +38,8 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,16 +24,16 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_output_exists():
|
||||
assert os.path.exists(cwd + '/tallies.out'), 'Tally output file does not exist.'
|
||||
assert os.path.exists(os.path.join(cwd,'tallies.out')), 'Tally output file does not exist.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -41,9 +41,9 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/tallies.out')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'tallies.out'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,16 +24,16 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_output_exists():
|
||||
assert os.path.exists(cwd + '/tallies.out'), 'Tally output file does not exist.'
|
||||
assert os.path.exists(os.path.join(cwd,'tallies.out')), 'Tally output file does not exist.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -41,9 +41,9 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/tallies.out')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'tallies.out'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,16 +24,16 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_output_exists():
|
||||
assert os.path.exists(cwd + '/tallies.out'), 'Tally output file does not exist.'
|
||||
assert os.path.exists(os.path.join(cwd,'tallies.out')), 'Tally output file does not exist.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -41,9 +41,9 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/tallies.out')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'tallies.out'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,16 +24,16 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_output_exists():
|
||||
assert os.path.exists(cwd + '/tallies.out'), 'Tally output file does not exist.'
|
||||
assert os.path.exists(os.path.join(cwd,'tallies.out')), 'Tally output file does not exist.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -41,9 +41,9 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/tallies.out')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'tallies.out'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,16 +24,16 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_output_exists():
|
||||
assert os.path.exists(cwd + '/tallies.out'), 'Tally output file does not exist.'
|
||||
assert os.path.exists(os.path.join(cwd,'tallies.out')), 'Tally output file does not exist.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -41,9 +41,9 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/tallies.out')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'tallies.out'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,16 +24,16 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_output_exists():
|
||||
assert os.path.exists(cwd + '/tallies.out'), 'Tally output file does not exist.'
|
||||
assert os.path.exists(os.path.join(cwd,'tallies.out')), 'Tally output file does not exist.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -41,9 +41,9 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/tallies.out')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'tallies.out'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,16 +24,16 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_output_exists():
|
||||
assert os.path.exists(cwd + '/tallies.out'), 'Tally output file does not exist.'
|
||||
assert os.path.exists(os.path.join(cwd,'tallies.out')), 'Tally output file does not exist.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -41,9 +41,9 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/tallies.out')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'tallies.out'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,16 +24,16 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_output_exists():
|
||||
assert os.path.exists(cwd + '/tallies.out'), 'Tally output file does not exist.'
|
||||
assert os.path.exists(os.path.join(cwd,'tallies.out')), 'Tally output file does not exist.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -41,9 +41,9 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/tallies.out')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'tallies.out'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,16 +24,16 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_output_exists():
|
||||
assert os.path.exists(cwd + '/tallies.out'), 'Tally output file does not exist.'
|
||||
assert os.path.exists(os.path.join(cwd,'tallies.out')), 'Tally output file does not exist.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -41,9 +41,9 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/tallies.out')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'tallies.out'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,16 +24,16 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_output_exists():
|
||||
assert os.path.exists(cwd + '/tallies.out'), 'Tally output file does not exist.'
|
||||
assert os.path.exists(os.path.join(cwd,'tallies.out')), 'Tally output file does not exist.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -41,9 +41,9 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/tallies.out')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'tallies.out'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,16 +24,16 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_output_exists():
|
||||
assert os.path.exists(cwd + '/tallies.out'), 'Tally output file does not exist.'
|
||||
assert os.path.exists(os.path.join(cwd,'tallies.out')), 'Tally output file does not exist.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -41,9 +41,9 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/tallies.out')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'tallies.out'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,16 +24,16 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_output_exists():
|
||||
assert os.path.exists(cwd + '/tallies.out'), 'Tally output file does not exist.'
|
||||
assert os.path.exists(os.path.join(cwd,'tallies.out')), 'Tally output file does not exist.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -41,9 +41,9 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/tallies.out')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'tallies.out'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,16 +24,16 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_output_exists():
|
||||
assert os.path.exists(cwd + '/tallies.out'), 'Tally output file does not exist.'
|
||||
assert os.path.exists(os.path.join(cwd,'tallies.out')), 'Tally output file does not exist.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -41,9 +41,9 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/tallies.out')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'tallies.out'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -38,8 +38,8 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -38,8 +38,8 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -38,8 +38,8 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -38,8 +38,8 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -61,18 +61,18 @@ def test_run1():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_statepoint_exists():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
source = glob.glob(cwd + '/source.10.*')
|
||||
source = glob.glob(os.path.join(cwd,'source.10.*'))
|
||||
assert len(statepoint) == 1, 'Either multple or no source files exist.'
|
||||
assert source[0].endswith('binary') or source[0].endswith('h5'),\
|
||||
'Source file is not a binary or hdf5 file.'
|
||||
|
||||
def test_run2():
|
||||
openmc_path = cwd + '/../../src/openmc'
|
||||
source = glob.glob(cwd + '/source.10.*')
|
||||
openmc_path = os.path.join(cwd, '../../src/openmc')
|
||||
source = glob.glob(os.path.join(cwd,'source.10.*'))
|
||||
with open('settings.xml','w') as fh:
|
||||
fh.write(settings2.format(source[0].split('.')[2]))
|
||||
if opts.mpi_exec != '':
|
||||
|
|
@ -85,7 +85,7 @@ def test_run2():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -95,9 +95,9 @@ def test_results():
|
|||
def teardown():
|
||||
with open('settings.xml','w') as fh:
|
||||
fh.write(settings1)
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output += glob.glob(cwd + '/source.10.*')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output += glob.glob(os.path.join(cwd,'source.10.*'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -38,8 +38,8 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_statepoint_exists():
|
||||
statepoint = glob.glob(cwd + '/statepoint.*')
|
||||
statepoint = glob.glob(os.path.join(cwd, 'statepoint.*'))
|
||||
assert len(statepoint) == 5, '5 statepoint files must exist.'
|
||||
assert statepoint[0].endswith('binary') or statepoint[0].endswith('h5'),\
|
||||
'Statepoint file detected that is not binary or hdf5.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.8.*')
|
||||
statepoint = glob.glob(os.path.join(cwd, 'statepoint.8.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -38,8 +38,8 @@ def test_results():
|
|||
assert compare, 'Results do no agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.*')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd, 'statepoint.*'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_statepoint_exists():
|
||||
statepoint = glob.glob(cwd + '/statepoint.*')
|
||||
statepoint = glob.glob(os.path.join(cwd, 'statepoint.*'))
|
||||
assert len(statepoint) == 5, '5 statepoint files must exist.'
|
||||
assert statepoint[0].endswith('binary') or statepoint[0].endswith('h5'),\
|
||||
'Statepoint file detected that is not binary or hdf5.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.8.*')
|
||||
statepoint = glob.glob(os.path.join(cwd, 'statepoint.8.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -38,8 +38,8 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.*')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd, 'statepoint.*'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,17 +24,17 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_statepoint_exists():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
assert len(statepoint) == 1, 'Either multiple or no statepoint file exists.'
|
||||
assert statepoint[0].endswith('binary') or statepoint[0].endswith('h5'),\
|
||||
'Statepoint file is not a binary or hdf5 file.'
|
||||
source = glob.glob(cwd + '/source.*')
|
||||
source = glob.glob(os.path.join(cwd,'source.*'))
|
||||
assert len(source) == 1, 'Either multple or no source file exists.'
|
||||
assert source[0].endswith('binary') or source[0].endswith('h5'),\
|
||||
'Source file is not a binary or hdf5 file.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -42,9 +42,9 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output += glob.glob(cwd + '/source.*')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output += glob.glob(os.path.join(cwd,'source.*'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,17 +24,17 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.*')
|
||||
statepoint = glob.glob(os.path.join(cwd, 'statepoint.*'))
|
||||
assert len(statepoint) == 2, '2 statepoint files must exist.'
|
||||
assert statepoint[0].endswith('binary') or statepoint[0].endswith('h5'),\
|
||||
'Statepoint file must either be binary or hdf5.'
|
||||
sourcepoint = glob.glob(cwd + '/source.7.*')
|
||||
sourcepoint = glob.glob(os.path.join(cwd,'source.7.*'))
|
||||
assert len(sourcepoint) == 1, 'Either multiple or no source files found.'
|
||||
assert sourcepoint[0].endswith('binary') or sourcepoint[0].endswith('h5'),\
|
||||
'Source file must either be binary or hdf5.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -43,8 +43,8 @@ def test_results():
|
|||
os.remove(statepoint[0])
|
||||
|
||||
def test_restart_form1():
|
||||
statepoint = glob.glob(cwd + '/statepoint.7.*')
|
||||
sourcepoint = glob.glob(cwd + '/source.7.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.7.*'))
|
||||
sourcepoint = glob.glob(os.path.join(cwd,'source.7.*'))
|
||||
if opts.mpi_exec != '':
|
||||
proc = Popen([opts.mpi_exec, '-np', opts.mpi_np, opts.exe,
|
||||
'-r', statepoint[0], sourcepoint[0], cwd], stderr=STDOUT, stdout=PIPE)
|
||||
|
|
@ -55,13 +55,13 @@ def test_restart_form1():
|
|||
assert returncode == 0, 'OpenMC restart 1 did not exit successfully.'
|
||||
|
||||
def test_created_statepoint_form1():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
assert len(statepoint) == 1, 'Batch 10 statepoint file does not exist.'
|
||||
assert statepoint[0].endswith('binary') or statepoint[0].endswith('h5'),\
|
||||
'Statepoint file must be a binary or hdf5 file.'
|
||||
|
||||
def test_results_form1():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -70,8 +70,8 @@ def test_results_form1():
|
|||
os.remove(statepoint[0])
|
||||
|
||||
def test_restart_form2():
|
||||
statepoint = glob.glob(cwd + '/statepoint.7.*')
|
||||
sourcepoint = glob.glob(cwd + '/source.7.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.7.*'))
|
||||
sourcepoint = glob.glob(os.path.join(cwd,'source.7.*'))
|
||||
if opts.mpi_exec != '':
|
||||
proc = Popen([opts.mpi_exec, '-np', opts.mpi_np, opts.exe,
|
||||
'--restart', statepoint[0], sourcepoint[0], cwd], stderr=STDOUT, stdout=PIPE)
|
||||
|
|
@ -82,13 +82,13 @@ def test_restart_form2():
|
|||
assert returncode == 0, 'OpenMC restart 2 did not exit successfully.'
|
||||
|
||||
def test_created_statepoint_form2():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
assert len(statepoint) == 1, 'Batch 10 statepoint file does not exist.'
|
||||
assert statepoint[0].endswith('binary') or statepoint[0].endswith('h5'),\
|
||||
'Statepoint file not a binary or hdf5 file.'
|
||||
|
||||
def test_results_form2():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -97,21 +97,21 @@ def test_results_form2():
|
|||
os.remove(statepoint[0])
|
||||
|
||||
def test_restart_serial():
|
||||
statepoint = glob.glob(cwd + '/statepoint.7.*')
|
||||
sourcepoint = glob.glob(cwd + '/source.7.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.7.*'))
|
||||
sourcepoint = glob.glob(os.path.join(cwd,'source.7.*'))
|
||||
proc = Popen([opts.exe, '--restart', statepoint[0], sourcepoint[0], cwd], stderr=STDOUT, stdout=PIPE)
|
||||
print(proc.communicate()[0])
|
||||
returncode = proc.returncode
|
||||
assert returncode == 0, 'OpenMC restart serial did not exit successfully.'
|
||||
|
||||
def test_created_statepoint_serial():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
assert len(statepoint) == 1, 'Batch 10 statepoint file does not exist.'
|
||||
assert statepoint[0].endswith('binary') or statepoint[0].endswith('h5'),\
|
||||
'Statepoint file is not a binary or hdf5 file.'
|
||||
|
||||
def test_results_serial():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -119,9 +119,9 @@ def test_results_serial():
|
|||
assert compare, 'Serial results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.*')
|
||||
output += glob.glob(cwd + '/source.*')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd, 'statepoint.*'))
|
||||
output += glob.glob(os.path.join(cwd,'source.*'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,21 +24,21 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_statepoints_exist():
|
||||
statepoint = glob.glob(cwd + '/statepoint.3.*')
|
||||
statepoint = glob.glob(os.path.join(cwd, 'statepoint.3.*'))
|
||||
assert len(statepoint) == 1, 'Either multiple or no statepoint.3 files exist.'
|
||||
assert statepoint[0].endswith('binary') or statepoint[0].endswith('h5'),\
|
||||
'Statepoint.3 file is not a binary or hdf5 file.'
|
||||
statepoint = glob.glob(cwd + '/statepoint.6.*')
|
||||
statepoint = glob.glob(os.path.join(cwd, 'statepoint.6.*'))
|
||||
assert len(statepoint) == 1, 'Either multiple or no statepoint.6 files exist.'
|
||||
assert statepoint[0].endswith('binary') or statepoint[0].endswith('h5'),\
|
||||
'Statepoint.6 file is not a binary or hdf5 file.'
|
||||
statepoint = glob.glob(cwd + '/statepoint.9.*')
|
||||
statepoint = glob.glob(os.path.join(cwd, 'statepoint.9.*'))
|
||||
assert len(statepoint) == 1, 'Either multiple or no statepoint.9 files exist.'
|
||||
assert statepoint[0].endswith('binary') or statepoint[0].endswith('h5'),\
|
||||
'Statepoint.9 file is not a binary or hdf5 file.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.9.*')
|
||||
statepoint = glob.glob(os.path.join(cwd, 'statepoint.9.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -46,8 +46,8 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint*')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd, 'statepoint*'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -25,29 +25,29 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_statepoints_exist():
|
||||
statepoint = glob.glob(cwd + '/statepoint.2.*')
|
||||
statepoint = glob.glob(os.path.join(cwd, 'statepoint.2.*'))
|
||||
assert len(statepoint) == 1, 'Either multiple or no statepoint.2 files exist.'
|
||||
assert statepoint[0].endswith('binary') or statepoint[0].endswith('h5'),\
|
||||
'Statepoint.2 file is not a binary or hdf5 file.'
|
||||
statepoint = glob.glob(cwd + '/statepoint.4.*')
|
||||
statepoint = glob.glob(os.path.join(cwd, 'statepoint.4.*'))
|
||||
assert len(statepoint) == 1, 'Either multiple or no statepoint.4 files exist.'
|
||||
assert statepoint[0].endswith('binary') or statepoint[0].endswith('h5'),\
|
||||
'Statepoint.4 file is not a binary or hdf5 file.'
|
||||
statepoint = glob.glob(cwd + '/statepoint.6.*')
|
||||
statepoint = glob.glob(os.path.join(cwd, 'statepoint.6.*'))
|
||||
assert len(statepoint) == 1, 'Either multiple or no statepoint.6 files exist.'
|
||||
assert statepoint[0].endswith('binary') or statepoint[0].endswith('h5'),\
|
||||
'Statepoint.6 file is not a binary or hdf5 file.'
|
||||
statepoint = glob.glob(cwd + '/statepoint.8.*')
|
||||
statepoint = glob.glob(os.path.join(cwd, 'statepoint.8.*'))
|
||||
assert len(statepoint) == 1, 'Either multiple or no statepoint.8 files exist.'
|
||||
assert statepoint[0].endswith('binary') or statepoint[0].endswith('h5'),\
|
||||
'Statepoint.8 file is not a binary or hdf5 file.'
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
assert len(statepoint) == 1, 'Either multiple or no statepoint.10 files exist.'
|
||||
assert statepoint[0].endswith('binary') or statepoint[0].endswith('h5'),\
|
||||
'Statepoint.10 file is not a binary or hdf5 file.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -55,8 +55,8 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.*')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd, 'statepoint.*'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.7.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.7.*'))
|
||||
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.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.7.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.7.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -38,7 +38,7 @@ def test_results():
|
|||
assert compare, 'Initial test results do not agree.'
|
||||
|
||||
def test_restart_form1():
|
||||
statepoint = glob.glob(cwd + '/statepoint.7.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.7.*'))
|
||||
if opts.mpi_exec != '':
|
||||
proc = Popen([opts.mpi_exec, '-np', opts.mpi_np, opts.exe,
|
||||
'-r', statepoint[0], cwd], stderr=STDOUT, stdout=PIPE)
|
||||
|
|
@ -49,13 +49,13 @@ def test_restart_form1():
|
|||
assert returncode == 0, 'OpenMC restart 1 did not exit successfully.'
|
||||
|
||||
def test_created_statepoint_form1():
|
||||
statepoint = glob.glob(cwd + '/statepoint.7.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.7.*'))
|
||||
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.'
|
||||
|
||||
def test_results_form1():
|
||||
statepoint = glob.glob(cwd + '/statepoint.7.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.7.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -63,7 +63,7 @@ def test_results_form1():
|
|||
assert compare, 'Restart 1 test results do not agree.'
|
||||
|
||||
def test_restart_form2():
|
||||
statepoint = glob.glob(cwd + '/statepoint.7.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.7.*'))
|
||||
if opts.mpi_exec != '':
|
||||
proc = Popen([opts.mpi_exec, '-np', opts.mpi_np, opts.exe,
|
||||
'--restart', statepoint[0], cwd], stderr=STDOUT, stdout=PIPE)
|
||||
|
|
@ -74,13 +74,13 @@ def test_restart_form2():
|
|||
assert returncode == 0, 'OpenMC restart 2 did not exit successfully.'
|
||||
|
||||
def test_created_statepoint_form2():
|
||||
statepoint = glob.glob(cwd + '/statepoint.7.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.7.*'))
|
||||
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.'
|
||||
|
||||
def test_results_form2():
|
||||
statepoint = glob.glob(cwd + '/statepoint.7.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.7.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -88,20 +88,20 @@ def test_results_form2():
|
|||
assert compare, 'Restart 2 test results do not agree.'
|
||||
|
||||
def test_restart_serial():
|
||||
statepoint = glob.glob(cwd + '/statepoint.7.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.7.*'))
|
||||
proc = Popen([opts.exe, '--restart', statepoint[0], cwd], stderr=STDOUT, stdout=PIPE)
|
||||
print(proc.communicate()[0])
|
||||
returncode = proc.returncode
|
||||
assert returncode == 0, 'OpenMC restart serial did not exit successfully.'
|
||||
|
||||
def test_created_statepoint_serial():
|
||||
statepoint = glob.glob(cwd + '/statepoint.7.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.7.*'))
|
||||
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.'
|
||||
|
||||
def test_results_serial():
|
||||
statepoint = glob.glob(cwd + '/statepoint.7.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.7.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -109,8 +109,8 @@ def test_results_serial():
|
|||
assert compare, 'Restart serial test results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.7.*')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.7.*'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,17 +24,17 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_statepoint_exists():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
source = glob.glob(cwd + '/source.10.*')
|
||||
source = glob.glob(os.path.join(cwd,'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.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -42,9 +42,9 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output += glob.glob(cwd + '/source.10.*')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output += glob.glob(os.path.join(cwd,'source.10.*'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -38,8 +38,8 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,16 +24,16 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_output_exists():
|
||||
assert os.path.exists(cwd + '/tallies.out'), 'Tally output file does not exist.'
|
||||
assert os.path.exists(os.path.join(cwd,'tallies.out')), 'Tally output file does not exist.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -41,9 +41,9 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/tallies.out')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'tallies.out'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -26,13 +26,13 @@ def test_run():
|
|||
assert stdout.find('Simulating Particle 453') != -1
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -40,8 +40,8 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -38,8 +38,8 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -38,8 +38,8 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -38,8 +38,8 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ def test_run():
|
|||
assert returncode == 0, 'OpenMC did not exit successfully.'
|
||||
|
||||
def test_created_statepoint():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
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.'
|
||||
|
||||
def test_results():
|
||||
statepoint = glob.glob(cwd + '/statepoint.10.*')
|
||||
statepoint = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
call(['python', 'results.py', statepoint[0]])
|
||||
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
|
||||
if not compare:
|
||||
|
|
@ -38,8 +38,8 @@ def test_results():
|
|||
assert compare, 'Results do not agree.'
|
||||
|
||||
def teardown():
|
||||
output = glob.glob(cwd + '/statepoint.10.*')
|
||||
output.append(cwd + '/results_test.dat')
|
||||
output = glob.glob(os.path.join(cwd,'statepoint.10.*'))
|
||||
output.append(os.path.join(cwd,'results_test.dat'))
|
||||
for f in output:
|
||||
if os.path.exists(f):
|
||||
os.remove(f)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue