diff --git a/tests/test_sourcepoint_batch/results.py b/tests/test_sourcepoint_batch/results.py index 9b0f577eb0..96984b2fae 100644 --- a/tests/test_sourcepoint_batch/results.py +++ b/tests/test_sourcepoint_batch/results.py @@ -10,7 +10,7 @@ import statepoint if len(sys.argv) > 1: sp = statepoint.StatePoint(sys.argv[1]) else: - sp = statepoint.StatePoint('statepoint.8.binary') + sp = statepoint.StatePoint('statepoint.08.binary') sp.read_results() sp.read_source() diff --git a/tests/test_sourcepoint_batch/test_sourcepoint_batch.py b/tests/test_sourcepoint_batch/test_sourcepoint_batch.py index a1c89690b8..4258a54de7 100644 --- a/tests/test_sourcepoint_batch/test_sourcepoint_batch.py +++ b/tests/test_sourcepoint_batch/test_sourcepoint_batch.py @@ -30,7 +30,7 @@ def test_statepoint_exists(): 'Statepoint file detected that is not binary or hdf5.' def test_results(): - statepoint = glob.glob(os.path.join(cwd, 'statepoint.8.*')) + statepoint = glob.glob(os.path.join(cwd, 'statepoint.08.*')) call(['python', 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: diff --git a/tests/test_sourcepoint_interval/results.py b/tests/test_sourcepoint_interval/results.py index 9b0f577eb0..96984b2fae 100644 --- a/tests/test_sourcepoint_interval/results.py +++ b/tests/test_sourcepoint_interval/results.py @@ -10,7 +10,7 @@ import statepoint if len(sys.argv) > 1: sp = statepoint.StatePoint(sys.argv[1]) else: - sp = statepoint.StatePoint('statepoint.8.binary') + sp = statepoint.StatePoint('statepoint.08.binary') sp.read_results() sp.read_source() diff --git a/tests/test_sourcepoint_interval/test_sourcepoint_interval.py b/tests/test_sourcepoint_interval/test_sourcepoint_interval.py index a583370c35..2a089747f6 100644 --- a/tests/test_sourcepoint_interval/test_sourcepoint_interval.py +++ b/tests/test_sourcepoint_interval/test_sourcepoint_interval.py @@ -30,7 +30,7 @@ def test_statepoint_exists(): 'Statepoint file detected that is not binary or hdf5.' def test_results(): - statepoint = glob.glob(os.path.join(cwd, 'statepoint.8.*')) + statepoint = glob.glob(os.path.join(cwd, 'statepoint.08.*')) call(['python', 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: diff --git a/tests/test_sourcepoint_restart/test_sourcepoint_restart.py b/tests/test_sourcepoint_restart/test_sourcepoint_restart.py index d42763be3e..47033b0121 100644 --- a/tests/test_sourcepoint_restart/test_sourcepoint_restart.py +++ b/tests/test_sourcepoint_restart/test_sourcepoint_restart.py @@ -28,7 +28,7 @@ def test_created_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(os.path.join(cwd, 'source.7.*')) + sourcepoint = glob.glob(os.path.join(cwd, 'source.07.*')) 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.' @@ -43,8 +43,8 @@ def test_results(): os.remove(statepoint[0]) def test_restart_form1(): - statepoint = glob.glob(os.path.join(cwd, 'statepoint.7.*')) - sourcepoint = glob.glob(os.path.join(cwd, 'source.7.*')) + statepoint = glob.glob(os.path.join(cwd, 'statepoint.07.*')) + sourcepoint = glob.glob(os.path.join(cwd, 'source.07.*')) 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) @@ -70,8 +70,8 @@ def test_results_form1(): os.remove(statepoint[0]) def test_restart_form2(): - statepoint = glob.glob(os.path.join(cwd, 'statepoint.7.*')) - sourcepoint = glob.glob(os.path.join(cwd, 'source.7.*')) + statepoint = glob.glob(os.path.join(cwd, 'statepoint.07.*')) + sourcepoint = glob.glob(os.path.join(cwd, 'source.07.*')) 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) @@ -97,8 +97,8 @@ def test_results_form2(): os.remove(statepoint[0]) def test_restart_serial(): - statepoint = glob.glob(os.path.join(cwd, 'statepoint.7.*')) - sourcepoint = glob.glob(os.path.join(cwd, 'source.7.*')) + statepoint = glob.glob(os.path.join(cwd, 'statepoint.07.*')) + sourcepoint = glob.glob(os.path.join(cwd, 'source.07.*')) proc = Popen([opts.exe, '--restart', statepoint[0], sourcepoint[0], cwd], stderr=STDOUT, stdout=PIPE) print(proc.communicate()[0]) returncode = proc.returncode diff --git a/tests/test_statepoint_batch/results.py b/tests/test_statepoint_batch/results.py index 31c0ac3caa..112c005167 100644 --- a/tests/test_statepoint_batch/results.py +++ b/tests/test_statepoint_batch/results.py @@ -10,7 +10,7 @@ import statepoint if len(sys.argv) > 1: sp = statepoint.StatePoint(sys.argv[1]) else: - sp = statepoint.StatePoint('statepoint.9.binary') + sp = statepoint.StatePoint('statepoint.09.binary') sp.read_results() # set up output string diff --git a/tests/test_statepoint_batch/test_statepoint_batch.py b/tests/test_statepoint_batch/test_statepoint_batch.py index a594b2c5a9..e1951d23fd 100644 --- a/tests/test_statepoint_batch/test_statepoint_batch.py +++ b/tests/test_statepoint_batch/test_statepoint_batch.py @@ -24,21 +24,21 @@ def test_run(): assert returncode == 0, 'OpenMC did not exit successfully.' def test_statepoints_exist(): - statepoint = glob.glob(os.path.join(cwd, 'statepoint.3.*')) - assert len(statepoint) == 1, 'Either multiple or no statepoint.3 files exist.' + statepoint = glob.glob(os.path.join(cwd, 'statepoint.03.*')) + assert len(statepoint) == 1, 'Either multiple or no statepoint.03 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(os.path.join(cwd, 'statepoint.6.*')) - assert len(statepoint) == 1, 'Either multiple or no statepoint.6 files exist.' + statepoint = glob.glob(os.path.join(cwd, 'statepoint.06.*')) + assert len(statepoint) == 1, 'Either multiple or no statepoint.06 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(os.path.join(cwd, 'statepoint.9.*')) - assert len(statepoint) == 1, 'Either multiple or no statepoint.9 files exist.' + statepoint = glob.glob(os.path.join(cwd, 'statepoint.09.*')) + assert len(statepoint) == 1, 'Either multiple or no statepoint.09 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(os.path.join(cwd, 'statepoint.9.*')) + statepoint = glob.glob(os.path.join(cwd, 'statepoint.09.*')) call(['python', 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: diff --git a/tests/test_statepoint_interval/test_statepoint_interval.py b/tests/test_statepoint_interval/test_statepoint_interval.py index b7c30d3384..1099566e58 100644 --- a/tests/test_statepoint_interval/test_statepoint_interval.py +++ b/tests/test_statepoint_interval/test_statepoint_interval.py @@ -25,20 +25,20 @@ def test_run(): assert returncode == 0, 'OpenMC did not exit successfully.' def test_statepoints_exist(): - statepoint = glob.glob(os.path.join(cwd, 'statepoint.2.*')) - assert len(statepoint) == 1, 'Either multiple or no statepoint.2 files exist.' + statepoint = glob.glob(os.path.join(cwd, 'statepoint.02.*')) + assert len(statepoint) == 1, 'Either multiple or no statepoint.02 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(os.path.join(cwd, 'statepoint.4.*')) - assert len(statepoint) == 1, 'Either multiple or no statepoint.4 files exist.' + statepoint = glob.glob(os.path.join(cwd, 'statepoint.04.*')) + assert len(statepoint) == 1, 'Either multiple or no statepoint.04 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(os.path.join(cwd, 'statepoint.6.*')) - assert len(statepoint) == 1, 'Either multiple or no statepoint.6 files exist.' + statepoint = glob.glob(os.path.join(cwd, 'statepoint.06.*')) + assert len(statepoint) == 1, 'Either multiple or no statepoint.06 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(os.path.join(cwd, 'statepoint.8.*')) - assert len(statepoint) == 1, 'Either multiple or no statepoint.8 files exist.' + statepoint = glob.glob(os.path.join(cwd, 'statepoint.08.*')) + assert len(statepoint) == 1, 'Either multiple or no statepoint.08 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(os.path.join(cwd, 'statepoint.10.*')) diff --git a/tests/test_statepoint_restart/results.py b/tests/test_statepoint_restart/results.py index d0b3a55e04..dd9dedd035 100644 --- a/tests/test_statepoint_restart/results.py +++ b/tests/test_statepoint_restart/results.py @@ -11,7 +11,7 @@ import statepoint if len(sys.argv) > 1: sp = statepoint.StatePoint(sys.argv[1]) else: - sp = statepoint.StatePoint('statepoint.7.binary') + sp = statepoint.StatePoint('statepoint.07.binary') sp.read_results() # extract tally results and convert to vector diff --git a/tests/test_statepoint_restart/test_statepoint_restart.py b/tests/test_statepoint_restart/test_statepoint_restart.py index 9473cc6923..a26a94442a 100644 --- a/tests/test_statepoint_restart/test_statepoint_restart.py +++ b/tests/test_statepoint_restart/test_statepoint_restart.py @@ -24,13 +24,13 @@ def test_run(): assert returncode == 0, 'OpenMC did not exit successfully.' def test_created_statepoint(): - statepoint = glob.glob(os.path.join(cwd, 'statepoint.7.*')) + statepoint = glob.glob(os.path.join(cwd, 'statepoint.07.*')) 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(os.path.join(cwd, 'statepoint.7.*')) + statepoint = glob.glob(os.path.join(cwd, 'statepoint.07.*')) 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(os.path.join(cwd, 'statepoint.7.*')) + statepoint = glob.glob(os.path.join(cwd, 'statepoint.07.*')) 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(os.path.join(cwd, 'statepoint.7.*')) + statepoint = glob.glob(os.path.join(cwd, 'statepoint.07.*')) 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(os.path.join(cwd, 'statepoint.7.*')) + statepoint = glob.glob(os.path.join(cwd, 'statepoint.07.*')) 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(os.path.join(cwd, 'statepoint.7.*')) + statepoint = glob.glob(os.path.join(cwd, 'statepoint.07.*')) 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(os.path.join(cwd, 'statepoint.7.*')) + statepoint = glob.glob(os.path.join(cwd, 'statepoint.07.*')) 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(os.path.join(cwd, 'statepoint.7.*')) + statepoint = glob.glob(os.path.join(cwd, 'statepoint.07.*')) 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(os.path.join(cwd, 'statepoint.7.*')) + statepoint = glob.glob(os.path.join(cwd, 'statepoint.07.*')) 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(os.path.join(cwd, 'statepoint.7.*')) + statepoint = glob.glob(os.path.join(cwd, 'statepoint.07.*')) 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(os.path.join(cwd, 'statepoint.7.*')) + statepoint = glob.glob(os.path.join(cwd, 'statepoint.07.*')) call(['python', 'results.py', statepoint[0]]) compare = filecmp.cmp('results_test.dat', 'results_true.dat') if not compare: @@ -109,7 +109,7 @@ def test_results_serial(): assert compare, 'Restart serial test results do not agree.' def teardown(): - output = glob.glob(os.path.join(cwd, 'statepoint.7.*')) + output = glob.glob(os.path.join(cwd, 'statepoint.07.*')) output.append(os.path.join(cwd, 'results_test.dat')) for f in output: if os.path.exists(f):