From 070e2824869a4df289f3b13f24ae8068108398cf Mon Sep 17 00:00:00 2001 From: Adam Nelson Date: Mon, 19 May 2014 09:36:39 -0400 Subject: [PATCH 1/8] Seem to have fixed the L(I) issue, testing now --- src/ace.F90 | 90 ++++++++++++++++++++++++----------------------------- 1 file changed, 41 insertions(+), 49 deletions(-) diff --git a/src/ace.F90 b/src/ace.F90 index e3327b2da..68302b16f 100644 --- a/src/ace.F90 +++ b/src/ace.F90 @@ -967,24 +967,23 @@ contains ! Continuous tabular distribution NR = int(XSS(lc + 1)) NE = int(XSS(lc + 2 + 2*NR)) - ! Before progressing, check to see if data set uses L(I) values - ! in a way inconsistent with the current form of the ACE Format Guide - ! (MCNP5 Manual, Vol 3) allocate(L(NE)) L = int(XSS(lc + 3 + 2*NR + NE: lc + 3 + 2*NR + 2*NE - 1)) - do i = 1,NE - ! Now check to see if L(i) is equal to any other entries - ! If so, then we must exit - if (count(L == L(i)) > 1) then - message = "Invalid usage of L(I) in ACE data; & - &Consider using more recent data set." - call fatal_error() - end if - end do - deallocate(L) + ! Continue with finding data length length = length + 2 + 2*NR + 2*NE do i = 1,NE + ! Some older data sets use the same LDAT for multiple Ein tables. + ! If this is the case, we should skip incrementing length when it is + ! not needed. + if (i < NE) then + if (L(i) == L(i + 1)) then + ! adjust location for this block + j = lc + 2 + 2*NR + NE + i + XSS(j) = XSS(j) - LOCC - lid + cycle + end if + end if ! determine length NP = int(XSS(lc + length + 2)) length = length + 2 + 3*NP @@ -993,6 +992,7 @@ contains j = lc + 2 + 2*NR + NE + i XSS(j) = XSS(j) - LOCC - lid end do + deallocate(L) case (5) ! General evaporation spectrum @@ -1025,24 +1025,23 @@ contains ! Kalbach-Mann correlated scattering NR = int(XSS(lc + 1)) NE = int(XSS(lc + 2 + 2*NR)) - ! Before progressing, check to see if data set uses L(I) values - ! in a way inconsistent with the current form of the ACE Format Guide - ! (MCNP5 Manual, Vol 3) allocate(L(NE)) L = int(XSS(lc + 3 + 2*NR + NE: lc + 3 + 2*NR + 2*NE - 1)) - do i = 1,NE - ! Now check to see if L(i) is equal to any other entries - ! If so, then we must exit - if (count(L == L(i)) > 1) then - message = "Invalid usage of L(I) in ACE data; & - &Consider using more recent data set." - call fatal_error() - end if - end do - deallocate(L) + ! Continue with finding data length length = length + 2 + 2*NR + 2*NE do i = 1,NE + ! Some older data sets use the same LDAT for multiple Ein tables. + ! If this is the case, we should skip incrementing length when it is + ! not needed. + if (i < NE) then + if (L(i) == L(i + 1)) then + ! adjust location for this block + j = lc + 2 + 2*NR + NE + i + XSS(j) = XSS(j) - LOCC - lid + cycle + end if + end if NP = int(XSS(lc + length + 2)) length = length + 2 + 5*NP @@ -1050,29 +1049,30 @@ contains j = lc + 2 + 2*NR + NE + i XSS(j) = XSS(j) - LOCC - lid end do + deallocate(L) case (61) ! Correlated energy and angle distribution NR = int(XSS(lc + 1)) NE = int(XSS(lc + 2 + 2*NR)) - ! Before progressing, check to see if data set uses L(I) values - ! in a way inconsistent with the current form of the ACE Format Guide - ! (MCNP5 Manual, Vol 3) allocate(L(NE)) L = int(XSS(lc + 3 + 2*NR + NE: lc + 3 + 2*NR + 2*NE - 1)) - do i = 1,NE - ! Now check to see if L(i) is equal to any other entries - ! If so, then we must exit - if (count(L == L(i)) > 1) then - message = "Invalid usage of L(I) in ACE data; & - &Consider using more recent data set." - call fatal_error() - end if - end do - deallocate(L) + ! Continue with finding data length length = length + 2 + 2*NR + 2*NE do i = 1,NE + ! Some older data sets use the same LDAT for multiple Ein tables. + ! If this is the case, we should skip incrementing length when it is + ! not needed. + if (i < NE) then + if (L(i) == L(i + 1)) then + ! adjust locators for energy distribution + j = lc + 2 + 2*NR + NE + i + XSS(j) = XSS(j) - LOCC - lid + cycle + end if + end if + ! outgoing energy distribution NP = int(XSS(lc + length + 2)) @@ -1094,7 +1094,7 @@ contains j = lc + 2 + 2*NR + NE + i XSS(j) = XSS(j) - LOCC - lid end do - + deallocate(L) case (66) ! N-body phase space distribution length = 2 @@ -1108,15 +1108,7 @@ contains ! (MCNP5 Manual, Vol 3) allocate(L(NE)) L = int(XSS(lc + 3 + 2*NR + NE: lc + 3 + 2*NR + 2*NE - 1)) - do i = 1,NE - ! Now check to see if L(i) is equal to any other entries - ! If so, then we must exit - if (count(L == L(i)) > 1) then - message = "Invalid usage of L(I) in ACE data; & - &Consider using more recent data set." - call fatal_error() - end if - end do + ! Don't currently do anything with L deallocate(L) ! Continue with finding data length NMU = int(XSS(lc + 4 + 2*NR + 2*NE)) From e22b452b5f4c90de637cf4b7035966d73163480c Mon Sep 17 00:00:00 2001 From: Adam Nelson Date: Mon, 19 May 2014 12:11:13 -0400 Subject: [PATCH 2/8] Fixed an issue where if ACE files first angular distribution for a given incoming energy was isotropic (LC=0), then the length calculation would be incorrect since rxn%adist%location(1) was 0. --- src/ace.F90 | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/ace.F90 b/src/ace.F90 index 68302b16f..0c1d519d3 100644 --- a/src/ace.F90 +++ b/src/ace.F90 @@ -789,14 +789,19 @@ contains ! read angular distribution -- currently this does not actually parse the ! angular distribution tables for each incoming energy, that must be done ! on-the-fly - LC = rxn % adist % location(1) - XSS_index = JXS9 + abs(LC) - 1 + XSS_index = JXS9 + LOCB + 2 * NE rxn % adist % data = get_real(length) ! change location pointers since they are currently relative to JXS(9) - LC = abs(rxn % adist % location(1)) - rxn % adist % location = abs(rxn % adist % location) - LC - + LC = LOCB + 2 * NE + 1 + do j = 1, NE + ! For consistency, leave location as 0 if type is isotropic. + ! This is not necessary for current correctness, but can avoid + ! future issues + if (rxn % adist % location(j) /= 0) then + rxn % adist % location(j) = abs(rxn % adist % location(j)) - LC + end if + end do end do end subroutine read_angular_dist From d1ca3519f2c56e400311ed9d6fde91f62512da0b Mon Sep 17 00:00:00 2001 From: Adam Nelson Date: Mon, 19 May 2014 12:19:14 -0400 Subject: [PATCH 3/8] Fixed sample_angles interpolation of mu. The old way was resulting in mus outside the range of [-1,1] and was effectively using the slope of the randomly selected bin but extrapolating to the next lower bin. --- src/physics.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/physics.F90 b/src/physics.F90 index 5d3433f3b..3460873e5 100644 --- a/src/physics.F90 +++ b/src/physics.F90 @@ -1164,7 +1164,7 @@ contains ! calculate cosine mu0 = rxn % adist % data(lc + k) mu1 = rxn % adist % data(lc + k+1) - mu = mu0 + (32.0_8 * xi - k) * (mu1 - mu0) + mu = mu0 + (32.0_8 * xi - k + ONE) * (mu1 - mu0) elseif (type == ANGLE_TABULAR) then interp = int(rxn % adist % data(lc + 1)) From 9b68d497a2efb4c6ac2df4853606f00ee5a42fc3 Mon Sep 17 00:00:00 2001 From: Adam Nelson Date: Mon, 19 May 2014 20:38:07 -0400 Subject: [PATCH 4/8] Info in Troubleshooting portion of manual regarding L(I) issue is no longer needed. Removed. --- docs/source/usersguide/troubleshoot.rst | 8 -------- 1 file changed, 8 deletions(-) diff --git a/docs/source/usersguide/troubleshoot.rst b/docs/source/usersguide/troubleshoot.rst index ba7e4405c..10ac12184 100644 --- a/docs/source/usersguide/troubleshoot.rst +++ b/docs/source/usersguide/troubleshoot.rst @@ -79,14 +79,6 @@ with the :envvar:`CROSS_SECTIONS` environment variable. It is recommended to add a line in your ``.profile`` or ``.bash_profile`` setting the :envvar:`CROSS_SECTIONS` environment variable. -ERROR: Invalid usage of L(I) in ACE data; Consider using more recent data set. -****************************************************************************** - -The cross-sections requested in ``materials.xml`` do not conform to the current -standard format. This typically happens with fissionable nuclides in a ``.6*c`` -library as distributed with MCNP. Please try a newer library such as any from -the ``.7*c`` set. - Geometry Debugging ****************** From eef806e608c880c8b77fd1b61a390587e37da97c Mon Sep 17 00:00:00 2001 From: Adam Nelson Date: Tue, 20 May 2014 06:16:49 -0400 Subject: [PATCH 5/8] Corrected ace reading to look for the existence of the same locator anywhere in the array instead of just after, and updated the tests. --- src/ace.F90 | 6 +++--- tests/test_source_file/results_true.dat | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ace.F90 b/src/ace.F90 index 0c1d519d3..d414e21f8 100644 --- a/src/ace.F90 +++ b/src/ace.F90 @@ -982,7 +982,7 @@ contains ! If this is the case, we should skip incrementing length when it is ! not needed. if (i < NE) then - if (L(i) == L(i + 1)) then + if (any(L(i) == L(i + 1: NE))) then ! adjust location for this block j = lc + 2 + 2*NR + NE + i XSS(j) = XSS(j) - LOCC - lid @@ -1040,7 +1040,7 @@ contains ! If this is the case, we should skip incrementing length when it is ! not needed. if (i < NE) then - if (L(i) == L(i + 1)) then + if (any(L(i) == L(i + 1: NE))) then ! adjust location for this block j = lc + 2 + 2*NR + NE + i XSS(j) = XSS(j) - LOCC - lid @@ -1070,7 +1070,7 @@ contains ! If this is the case, we should skip incrementing length when it is ! not needed. if (i < NE) then - if (L(i) == L(i + 1)) then + if (any(L(i) == L(i + 1: NE))) then ! adjust locators for energy distribution j = lc + 2 + 2*NR + NE + i XSS(j) = XSS(j) - LOCC - lid diff --git a/tests/test_source_file/results_true.dat b/tests/test_source_file/results_true.dat index d714d0bd4..eb3139f58 100644 --- a/tests/test_source_file/results_true.dat +++ b/tests/test_source_file/results_true.dat @@ -1,2 +1,2 @@ k-combined: -3.013216E-01 2.768871E-03 +3.037843E-01 4.395619E-03 From 692872297b93cbcfb66f7bf48832ac16d2fc2fa0 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Wed, 21 May 2014 17:34:50 -0400 Subject: [PATCH 6/8] Fix bug in source file test. When looking for a source file, it was assumed that the current working directory did not contain the character '.'. If the working directory did contain a '.', this test would fail. --- tests/test_source_file/test_source_file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_source_file/test_source_file.py b/tests/test_source_file/test_source_file.py index 51801c4dd..790c662d8 100644 --- a/tests/test_source_file/test_source_file.py +++ b/tests/test_source_file/test_source_file.py @@ -74,7 +74,7 @@ def test_run2(): 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])) + fh.write(settings2.format(source[0].split('.')[-1])) if opts.mpi_exec != '': proc = Popen([opts.mpi_exec, '-np', opts.mpi_np, opts.exe, cwd], stderr=STDOUT, stdout=PIPE) From d737d3f1a3b605d901239a7abea4c11bfab86234 Mon Sep 17 00:00:00 2001 From: Adam Nelson Date: Wed, 21 May 2014 19:47:55 -0400 Subject: [PATCH 7/8] Updated results_true.dat to correspond with the updated test. --- tests/test_source_file/results_true.dat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_source_file/results_true.dat b/tests/test_source_file/results_true.dat index eb3139f58..d714d0bd4 100644 --- a/tests/test_source_file/results_true.dat +++ b/tests/test_source_file/results_true.dat @@ -1,2 +1,2 @@ k-combined: -3.037843E-01 4.395619E-03 +3.013216E-01 2.768871E-03 From cbb4c1aeb971a67b2f2d961d2a88c6cd2e5da2b7 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Tue, 27 May 2014 16:51:52 -0400 Subject: [PATCH 8/8] Add try/finally in tests to make sure teardown() is called. --- tests/test_basic/test_basic.py | 10 ++++--- tests/test_cmfd_feed/test_cmfd_feed.py | 12 ++++---- tests/test_cmfd_jfnk/test_cmfd_jfnk.py | 12 ++++---- tests/test_cmfd_nofeed/test_cmfd_nofeed.py | 12 ++++---- .../test_confidence_intervals.py | 12 ++++---- .../test_density_atombcm.py | 10 ++++--- .../test_density_atomcm3.py | 10 ++++--- tests/test_density_kgm3/test_density_kgm3.py | 10 ++++--- tests/test_density_sum/test_density_sum.py | 10 ++++--- .../test_eigenvalue_genperbatch.py | 10 ++++--- .../test_eigenvalue_no_inactive.py | 10 ++++--- tests/test_energy_grid/test_energy_grid.py | 10 ++++--- tests/test_entropy/test_entropy.py | 10 ++++--- tests/test_filter_cell/test_filter_cell.py | 12 ++++---- .../test_filter_cellborn.py | 12 ++++---- .../test_filter_energy/test_filter_energy.py | 12 ++++---- .../test_filter_energyout.py | 12 ++++---- .../test_filter_group_transfer.py | 12 ++++---- .../test_filter_material.py | 12 ++++---- .../test_filter_mesh_2d.py | 12 ++++---- .../test_filter_mesh_3d.py | 12 ++++---- .../test_filter_universe.py | 12 ++++---- tests/test_fixed_source/test_fixed_source.py | 12 ++++---- tests/test_lattice/test_lattice.py | 10 ++++--- .../test_lattice_multiple.py | 10 ++++--- .../test_natural_element.py | 10 ++++--- tests/test_output/test_output.py | 14 ++++++---- .../test_particle_restart.py | 12 ++++---- .../test_plot_background.py | 8 ++++-- tests/test_plot_basis/test_plot_basis.py | 8 ++++-- tests/test_plot_colspec/test_plot_colspec.py | 8 ++++-- tests/test_plot_mask/test_plot_mask.py | 8 ++++-- tests/test_ptables_off/test_ptables_off.py | 10 ++++--- .../test_reflective_cone.py | 10 ++++--- .../test_reflective_cylinder.py | 10 ++++--- .../test_reflective_plane.py | 10 ++++--- .../test_reflective_sphere.py | 10 ++++--- tests/test_rotation/test_rotation.py | 10 ++++--- tests/test_salphabeta/test_salphabeta.py | 10 ++++--- .../test_salphabeta_multiple.py | 10 ++++--- tests/test_score_MT/test_score_MT.py | 12 ++++---- .../test_score_absorption.py | 12 ++++---- .../test_score_current/test_score_current.py | 12 ++++---- tests/test_score_events/test_score_events.py | 12 ++++---- .../test_score_fission/test_score_fission.py | 12 ++++---- tests/test_score_flux/test_score_flux.py | 12 ++++---- .../test_score_kappafission.py | 12 ++++---- .../test_score_nufission.py | 12 ++++---- .../test_score_nuscatter.py | 12 ++++---- .../test_score_scatter/test_score_scatter.py | 12 ++++---- .../test_score_scatter_n.py | 12 ++++---- .../test_score_scatter_pn.py | 12 ++++---- tests/test_score_total/test_score_total.py | 12 ++++---- tests/test_seed/test_seed.py | 10 ++++--- .../test_source_angle_mono.py | 10 ++++--- .../test_source_energy_maxwell.py | 10 ++++--- .../test_source_energy_mono.py | 10 ++++--- tests/test_source_file/test_source_file.py | 12 ++++---- tests/test_source_point/test_source_point.py | 10 ++++--- .../test_sourcepoint_batch.py | 10 ++++--- .../test_sourcepoint_interval.py | 10 ++++--- .../test_sourcepoint_latest.py | 10 ++++--- .../test_sourcepoint_restart.py | 28 ++++++++++--------- .../test_statepoint_batch.py | 10 ++++--- .../test_statepoint_interval.py | 10 ++++--- .../test_statepoint_restart.py | 28 ++++++++++--------- .../test_statepoint_sourcesep.py | 10 ++++--- .../test_survival_biasing.py | 10 ++++--- .../test_tally_assumesep.py | 12 ++++---- tests/test_trace/test_trace.py | 10 ++++--- tests/test_track_output/test_track_output.py | 10 ++++--- tests/test_translation/test_translation.py | 10 ++++--- tests/test_uniform_fs/test_uniform_fs.py | 10 ++++--- tests/test_universe/test_universe.py | 10 ++++--- tests/test_void/test_void.py | 10 ++++--- 75 files changed, 496 insertions(+), 346 deletions(-) diff --git a/tests/test_basic/test_basic.py b/tests/test_basic/test_basic.py index bcc3f8a81..6fdbf8745 100644 --- a/tests/test_basic/test_basic.py +++ b/tests/test_basic/test_basic.py @@ -51,7 +51,9 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_results() + finally: + teardown() diff --git a/tests/test_cmfd_feed/test_cmfd_feed.py b/tests/test_cmfd_feed/test_cmfd_feed.py index 20ee11f4d..14623a5ee 100644 --- a/tests/test_cmfd_feed/test_cmfd_feed.py +++ b/tests/test_cmfd_feed/test_cmfd_feed.py @@ -58,8 +58,10 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_output_exists() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_output_exists() + test_results() + finally: + teardown() diff --git a/tests/test_cmfd_jfnk/test_cmfd_jfnk.py b/tests/test_cmfd_jfnk/test_cmfd_jfnk.py index f270c105a..34892c53a 100644 --- a/tests/test_cmfd_jfnk/test_cmfd_jfnk.py +++ b/tests/test_cmfd_jfnk/test_cmfd_jfnk.py @@ -59,8 +59,10 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_output_exists() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_output_exists() + test_results() + finally: + teardown() diff --git a/tests/test_cmfd_nofeed/test_cmfd_nofeed.py b/tests/test_cmfd_nofeed/test_cmfd_nofeed.py index f270c105a..34892c53a 100644 --- a/tests/test_cmfd_nofeed/test_cmfd_nofeed.py +++ b/tests/test_cmfd_nofeed/test_cmfd_nofeed.py @@ -59,8 +59,10 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_output_exists() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_output_exists() + test_results() + finally: + teardown() diff --git a/tests/test_confidence_intervals/test_confidence_intervals.py b/tests/test_confidence_intervals/test_confidence_intervals.py index 650d94cb9..d1982f7fa 100644 --- a/tests/test_confidence_intervals/test_confidence_intervals.py +++ b/tests/test_confidence_intervals/test_confidence_intervals.py @@ -55,8 +55,10 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_created_output() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_created_output() + test_results() + finally: + teardown() diff --git a/tests/test_density_atombcm/test_density_atombcm.py b/tests/test_density_atombcm/test_density_atombcm.py index bcc3f8a81..6fdbf8745 100644 --- a/tests/test_density_atombcm/test_density_atombcm.py +++ b/tests/test_density_atombcm/test_density_atombcm.py @@ -51,7 +51,9 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_results() + finally: + teardown() diff --git a/tests/test_density_atomcm3/test_density_atomcm3.py b/tests/test_density_atomcm3/test_density_atomcm3.py index db434dd37..26d389c21 100644 --- a/tests/test_density_atomcm3/test_density_atomcm3.py +++ b/tests/test_density_atomcm3/test_density_atomcm3.py @@ -51,7 +51,9 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_results() + finally: + teardown() diff --git a/tests/test_density_kgm3/test_density_kgm3.py b/tests/test_density_kgm3/test_density_kgm3.py index bcc3f8a81..6fdbf8745 100644 --- a/tests/test_density_kgm3/test_density_kgm3.py +++ b/tests/test_density_kgm3/test_density_kgm3.py @@ -51,7 +51,9 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_results() + finally: + teardown() diff --git a/tests/test_density_sum/test_density_sum.py b/tests/test_density_sum/test_density_sum.py index 20e55c64c..b3384291b 100644 --- a/tests/test_density_sum/test_density_sum.py +++ b/tests/test_density_sum/test_density_sum.py @@ -51,7 +51,9 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_results() + finally: + teardown() diff --git a/tests/test_eigenvalue_genperbatch/test_eigenvalue_genperbatch.py b/tests/test_eigenvalue_genperbatch/test_eigenvalue_genperbatch.py index 59862c028..3ce7bf2db 100644 --- a/tests/test_eigenvalue_genperbatch/test_eigenvalue_genperbatch.py +++ b/tests/test_eigenvalue_genperbatch/test_eigenvalue_genperbatch.py @@ -51,7 +51,9 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_results() + finally: + teardown() diff --git a/tests/test_eigenvalue_no_inactive/test_eigenvalue_no_inactive.py b/tests/test_eigenvalue_no_inactive/test_eigenvalue_no_inactive.py index bcc3f8a81..6fdbf8745 100644 --- a/tests/test_eigenvalue_no_inactive/test_eigenvalue_no_inactive.py +++ b/tests/test_eigenvalue_no_inactive/test_eigenvalue_no_inactive.py @@ -51,7 +51,9 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_results() + finally: + teardown() diff --git a/tests/test_energy_grid/test_energy_grid.py b/tests/test_energy_grid/test_energy_grid.py index bcc3f8a81..6fdbf8745 100644 --- a/tests/test_energy_grid/test_energy_grid.py +++ b/tests/test_energy_grid/test_energy_grid.py @@ -51,7 +51,9 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_results() + finally: + teardown() diff --git a/tests/test_entropy/test_entropy.py b/tests/test_entropy/test_entropy.py index bdfb6269e..2f4196b28 100644 --- a/tests/test_entropy/test_entropy.py +++ b/tests/test_entropy/test_entropy.py @@ -52,7 +52,9 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_results() + finally: + teardown() diff --git a/tests/test_filter_cell/test_filter_cell.py b/tests/test_filter_cell/test_filter_cell.py index 6e54389fc..962a1ca26 100644 --- a/tests/test_filter_cell/test_filter_cell.py +++ b/tests/test_filter_cell/test_filter_cell.py @@ -55,8 +55,10 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_output_exists() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_output_exists() + test_results() + finally: + teardown() diff --git a/tests/test_filter_cellborn/test_filter_cellborn.py b/tests/test_filter_cellborn/test_filter_cellborn.py index cf1f0c288..78132bcfc 100644 --- a/tests/test_filter_cellborn/test_filter_cellborn.py +++ b/tests/test_filter_cellborn/test_filter_cellborn.py @@ -52,8 +52,10 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_output_exists() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_output_exists() + test_results() + finally: + teardown() diff --git a/tests/test_filter_energy/test_filter_energy.py b/tests/test_filter_energy/test_filter_energy.py index 6e54389fc..962a1ca26 100644 --- a/tests/test_filter_energy/test_filter_energy.py +++ b/tests/test_filter_energy/test_filter_energy.py @@ -55,8 +55,10 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_output_exists() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_output_exists() + test_results() + finally: + teardown() diff --git a/tests/test_filter_energyout/test_filter_energyout.py b/tests/test_filter_energyout/test_filter_energyout.py index 6e54389fc..962a1ca26 100644 --- a/tests/test_filter_energyout/test_filter_energyout.py +++ b/tests/test_filter_energyout/test_filter_energyout.py @@ -55,8 +55,10 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_output_exists() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_output_exists() + test_results() + finally: + teardown() diff --git a/tests/test_filter_group_transfer/test_filter_group_transfer.py b/tests/test_filter_group_transfer/test_filter_group_transfer.py index 6e54389fc..962a1ca26 100644 --- a/tests/test_filter_group_transfer/test_filter_group_transfer.py +++ b/tests/test_filter_group_transfer/test_filter_group_transfer.py @@ -55,8 +55,10 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_output_exists() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_output_exists() + test_results() + finally: + teardown() diff --git a/tests/test_filter_material/test_filter_material.py b/tests/test_filter_material/test_filter_material.py index 6e54389fc..962a1ca26 100644 --- a/tests/test_filter_material/test_filter_material.py +++ b/tests/test_filter_material/test_filter_material.py @@ -55,8 +55,10 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_output_exists() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_output_exists() + test_results() + finally: + teardown() diff --git a/tests/test_filter_mesh_2d/test_filter_mesh_2d.py b/tests/test_filter_mesh_2d/test_filter_mesh_2d.py index 6e54389fc..962a1ca26 100644 --- a/tests/test_filter_mesh_2d/test_filter_mesh_2d.py +++ b/tests/test_filter_mesh_2d/test_filter_mesh_2d.py @@ -55,8 +55,10 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_output_exists() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_output_exists() + test_results() + finally: + teardown() diff --git a/tests/test_filter_mesh_3d/test_filter_mesh_3d.py b/tests/test_filter_mesh_3d/test_filter_mesh_3d.py index 6e54389fc..962a1ca26 100644 --- a/tests/test_filter_mesh_3d/test_filter_mesh_3d.py +++ b/tests/test_filter_mesh_3d/test_filter_mesh_3d.py @@ -55,8 +55,10 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_output_exists() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_output_exists() + test_results() + finally: + teardown() diff --git a/tests/test_filter_universe/test_filter_universe.py b/tests/test_filter_universe/test_filter_universe.py index 6e54389fc..962a1ca26 100644 --- a/tests/test_filter_universe/test_filter_universe.py +++ b/tests/test_filter_universe/test_filter_universe.py @@ -55,8 +55,10 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_output_exists() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_output_exists() + test_results() + finally: + teardown() diff --git a/tests/test_fixed_source/test_fixed_source.py b/tests/test_fixed_source/test_fixed_source.py index 6e54389fc..962a1ca26 100644 --- a/tests/test_fixed_source/test_fixed_source.py +++ b/tests/test_fixed_source/test_fixed_source.py @@ -55,8 +55,10 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_output_exists() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_output_exists() + test_results() + finally: + teardown() diff --git a/tests/test_lattice/test_lattice.py b/tests/test_lattice/test_lattice.py index bcc3f8a81..6fdbf8745 100644 --- a/tests/test_lattice/test_lattice.py +++ b/tests/test_lattice/test_lattice.py @@ -51,7 +51,9 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_results() + finally: + teardown() diff --git a/tests/test_lattice_multiple/test_lattice_multiple.py b/tests/test_lattice_multiple/test_lattice_multiple.py index bcc3f8a81..6fdbf8745 100644 --- a/tests/test_lattice_multiple/test_lattice_multiple.py +++ b/tests/test_lattice_multiple/test_lattice_multiple.py @@ -51,7 +51,9 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_results() + finally: + teardown() diff --git a/tests/test_natural_element/test_natural_element.py b/tests/test_natural_element/test_natural_element.py index bcc3f8a81..6fdbf8745 100644 --- a/tests/test_natural_element/test_natural_element.py +++ b/tests/test_natural_element/test_natural_element.py @@ -51,7 +51,9 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_results() + finally: + teardown() diff --git a/tests/test_output/test_output.py b/tests/test_output/test_output.py index cb960cfe6..1ea9e3dbf 100644 --- a/tests/test_output/test_output.py +++ b/tests/test_output/test_output.py @@ -63,9 +63,11 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_summary_exists() - test_cross_sections_exists() - test_statepoint_exists() - test_results() - teardown() + try: + test_run() + test_summary_exists() + test_cross_sections_exists() + test_statepoint_exists() + test_results() + finally: + teardown() diff --git a/tests/test_particle_restart/test_particle_restart.py b/tests/test_particle_restart/test_particle_restart.py index 54d2b3b7e..3342c0af1 100644 --- a/tests/test_particle_restart/test_particle_restart.py +++ b/tests/test_particle_restart/test_particle_restart.py @@ -59,8 +59,10 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_restart() - test_results() - test_run_restart() - teardown() + try: + test_run() + test_created_restart() + test_results() + test_run_restart() + finally: + teardown() diff --git a/tests/test_plot_background/test_plot_background.py b/tests/test_plot_background/test_plot_background.py index 7e5687a53..92afb9a48 100644 --- a/tests/test_plot_background/test_plot_background.py +++ b/tests/test_plot_background/test_plot_background.py @@ -37,6 +37,8 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_plot_exists() - teardown() + try: + test_run() + test_plot_exists() + finally: + teardown() diff --git a/tests/test_plot_basis/test_plot_basis.py b/tests/test_plot_basis/test_plot_basis.py index 94c2ace26..81d197b50 100644 --- a/tests/test_plot_basis/test_plot_basis.py +++ b/tests/test_plot_basis/test_plot_basis.py @@ -39,6 +39,8 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_plots_exists() - teardown() + try: + test_run() + test_plots_exists() + finally: + teardown() diff --git a/tests/test_plot_colspec/test_plot_colspec.py b/tests/test_plot_colspec/test_plot_colspec.py index 7e5687a53..92afb9a48 100644 --- a/tests/test_plot_colspec/test_plot_colspec.py +++ b/tests/test_plot_colspec/test_plot_colspec.py @@ -37,6 +37,8 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_plot_exists() - teardown() + try: + test_run() + test_plot_exists() + finally: + teardown() diff --git a/tests/test_plot_mask/test_plot_mask.py b/tests/test_plot_mask/test_plot_mask.py index 94c2ace26..81d197b50 100644 --- a/tests/test_plot_mask/test_plot_mask.py +++ b/tests/test_plot_mask/test_plot_mask.py @@ -39,6 +39,8 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_plots_exists() - teardown() + try: + test_run() + test_plots_exists() + finally: + teardown() diff --git a/tests/test_ptables_off/test_ptables_off.py b/tests/test_ptables_off/test_ptables_off.py index bcc3f8a81..6fdbf8745 100644 --- a/tests/test_ptables_off/test_ptables_off.py +++ b/tests/test_ptables_off/test_ptables_off.py @@ -51,7 +51,9 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_results() + finally: + teardown() diff --git a/tests/test_reflective_cone/test_reflective_cone.py b/tests/test_reflective_cone/test_reflective_cone.py index bcc3f8a81..6fdbf8745 100644 --- a/tests/test_reflective_cone/test_reflective_cone.py +++ b/tests/test_reflective_cone/test_reflective_cone.py @@ -51,7 +51,9 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_results() + finally: + teardown() diff --git a/tests/test_reflective_cylinder/test_reflective_cylinder.py b/tests/test_reflective_cylinder/test_reflective_cylinder.py index bcc3f8a81..6fdbf8745 100644 --- a/tests/test_reflective_cylinder/test_reflective_cylinder.py +++ b/tests/test_reflective_cylinder/test_reflective_cylinder.py @@ -51,7 +51,9 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_results() + finally: + teardown() diff --git a/tests/test_reflective_plane/test_reflective_plane.py b/tests/test_reflective_plane/test_reflective_plane.py index bcc3f8a81..6fdbf8745 100644 --- a/tests/test_reflective_plane/test_reflective_plane.py +++ b/tests/test_reflective_plane/test_reflective_plane.py @@ -51,7 +51,9 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_results() + finally: + teardown() diff --git a/tests/test_reflective_sphere/test_reflective_sphere.py b/tests/test_reflective_sphere/test_reflective_sphere.py index bcc3f8a81..6fdbf8745 100644 --- a/tests/test_reflective_sphere/test_reflective_sphere.py +++ b/tests/test_reflective_sphere/test_reflective_sphere.py @@ -51,7 +51,9 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_results() + finally: + teardown() diff --git a/tests/test_rotation/test_rotation.py b/tests/test_rotation/test_rotation.py index bcc3f8a81..6fdbf8745 100644 --- a/tests/test_rotation/test_rotation.py +++ b/tests/test_rotation/test_rotation.py @@ -51,7 +51,9 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_results() + finally: + teardown() diff --git a/tests/test_salphabeta/test_salphabeta.py b/tests/test_salphabeta/test_salphabeta.py index bcc3f8a81..6fdbf8745 100644 --- a/tests/test_salphabeta/test_salphabeta.py +++ b/tests/test_salphabeta/test_salphabeta.py @@ -51,7 +51,9 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_results() + finally: + teardown() diff --git a/tests/test_salphabeta_multiple/test_salphabeta_multiple.py b/tests/test_salphabeta_multiple/test_salphabeta_multiple.py index bcc3f8a81..6fdbf8745 100644 --- a/tests/test_salphabeta_multiple/test_salphabeta_multiple.py +++ b/tests/test_salphabeta_multiple/test_salphabeta_multiple.py @@ -51,7 +51,9 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_results() + finally: + teardown() diff --git a/tests/test_score_MT/test_score_MT.py b/tests/test_score_MT/test_score_MT.py index 6e54389fc..962a1ca26 100644 --- a/tests/test_score_MT/test_score_MT.py +++ b/tests/test_score_MT/test_score_MT.py @@ -55,8 +55,10 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_output_exists() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_output_exists() + test_results() + finally: + teardown() diff --git a/tests/test_score_absorption/test_score_absorption.py b/tests/test_score_absorption/test_score_absorption.py index 6e54389fc..962a1ca26 100644 --- a/tests/test_score_absorption/test_score_absorption.py +++ b/tests/test_score_absorption/test_score_absorption.py @@ -55,8 +55,10 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_output_exists() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_output_exists() + test_results() + finally: + teardown() diff --git a/tests/test_score_current/test_score_current.py b/tests/test_score_current/test_score_current.py index 6e54389fc..962a1ca26 100644 --- a/tests/test_score_current/test_score_current.py +++ b/tests/test_score_current/test_score_current.py @@ -55,8 +55,10 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_output_exists() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_output_exists() + test_results() + finally: + teardown() diff --git a/tests/test_score_events/test_score_events.py b/tests/test_score_events/test_score_events.py index 6e54389fc..962a1ca26 100644 --- a/tests/test_score_events/test_score_events.py +++ b/tests/test_score_events/test_score_events.py @@ -55,8 +55,10 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_output_exists() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_output_exists() + test_results() + finally: + teardown() diff --git a/tests/test_score_fission/test_score_fission.py b/tests/test_score_fission/test_score_fission.py index 6e54389fc..962a1ca26 100644 --- a/tests/test_score_fission/test_score_fission.py +++ b/tests/test_score_fission/test_score_fission.py @@ -55,8 +55,10 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_output_exists() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_output_exists() + test_results() + finally: + teardown() diff --git a/tests/test_score_flux/test_score_flux.py b/tests/test_score_flux/test_score_flux.py index 6e54389fc..962a1ca26 100644 --- a/tests/test_score_flux/test_score_flux.py +++ b/tests/test_score_flux/test_score_flux.py @@ -55,8 +55,10 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_output_exists() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_output_exists() + test_results() + finally: + teardown() diff --git a/tests/test_score_kappafission/test_score_kappafission.py b/tests/test_score_kappafission/test_score_kappafission.py index 6e54389fc..962a1ca26 100644 --- a/tests/test_score_kappafission/test_score_kappafission.py +++ b/tests/test_score_kappafission/test_score_kappafission.py @@ -55,8 +55,10 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_output_exists() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_output_exists() + test_results() + finally: + teardown() diff --git a/tests/test_score_nufission/test_score_nufission.py b/tests/test_score_nufission/test_score_nufission.py index 6e54389fc..962a1ca26 100644 --- a/tests/test_score_nufission/test_score_nufission.py +++ b/tests/test_score_nufission/test_score_nufission.py @@ -55,8 +55,10 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_output_exists() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_output_exists() + test_results() + finally: + teardown() diff --git a/tests/test_score_nuscatter/test_score_nuscatter.py b/tests/test_score_nuscatter/test_score_nuscatter.py index 6e54389fc..962a1ca26 100644 --- a/tests/test_score_nuscatter/test_score_nuscatter.py +++ b/tests/test_score_nuscatter/test_score_nuscatter.py @@ -55,8 +55,10 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_output_exists() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_output_exists() + test_results() + finally: + teardown() diff --git a/tests/test_score_scatter/test_score_scatter.py b/tests/test_score_scatter/test_score_scatter.py index 6e54389fc..962a1ca26 100644 --- a/tests/test_score_scatter/test_score_scatter.py +++ b/tests/test_score_scatter/test_score_scatter.py @@ -55,8 +55,10 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_output_exists() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_output_exists() + test_results() + finally: + teardown() diff --git a/tests/test_score_scatter_n/test_score_scatter_n.py b/tests/test_score_scatter_n/test_score_scatter_n.py index 6e54389fc..962a1ca26 100644 --- a/tests/test_score_scatter_n/test_score_scatter_n.py +++ b/tests/test_score_scatter_n/test_score_scatter_n.py @@ -55,8 +55,10 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_output_exists() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_output_exists() + test_results() + finally: + teardown() diff --git a/tests/test_score_scatter_pn/test_score_scatter_pn.py b/tests/test_score_scatter_pn/test_score_scatter_pn.py index 6e54389fc..962a1ca26 100644 --- a/tests/test_score_scatter_pn/test_score_scatter_pn.py +++ b/tests/test_score_scatter_pn/test_score_scatter_pn.py @@ -55,8 +55,10 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_output_exists() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_output_exists() + test_results() + finally: + teardown() diff --git a/tests/test_score_total/test_score_total.py b/tests/test_score_total/test_score_total.py index 6e54389fc..962a1ca26 100644 --- a/tests/test_score_total/test_score_total.py +++ b/tests/test_score_total/test_score_total.py @@ -55,8 +55,10 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_output_exists() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_output_exists() + test_results() + finally: + teardown() diff --git a/tests/test_seed/test_seed.py b/tests/test_seed/test_seed.py index bcc3f8a81..6fdbf8745 100644 --- a/tests/test_seed/test_seed.py +++ b/tests/test_seed/test_seed.py @@ -51,7 +51,9 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_results() + finally: + teardown() diff --git a/tests/test_source_angle_mono/test_source_angle_mono.py b/tests/test_source_angle_mono/test_source_angle_mono.py index bcc3f8a81..6fdbf8745 100644 --- a/tests/test_source_angle_mono/test_source_angle_mono.py +++ b/tests/test_source_angle_mono/test_source_angle_mono.py @@ -51,7 +51,9 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_results() + finally: + teardown() diff --git a/tests/test_source_energy_maxwell/test_source_energy_maxwell.py b/tests/test_source_energy_maxwell/test_source_energy_maxwell.py index bcc3f8a81..6fdbf8745 100644 --- a/tests/test_source_energy_maxwell/test_source_energy_maxwell.py +++ b/tests/test_source_energy_maxwell/test_source_energy_maxwell.py @@ -51,7 +51,9 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_results() + finally: + teardown() diff --git a/tests/test_source_energy_mono/test_source_energy_mono.py b/tests/test_source_energy_mono/test_source_energy_mono.py index bcc3f8a81..6fdbf8745 100644 --- a/tests/test_source_energy_mono/test_source_energy_mono.py +++ b/tests/test_source_energy_mono/test_source_energy_mono.py @@ -51,7 +51,9 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_results() + finally: + teardown() diff --git a/tests/test_source_file/test_source_file.py b/tests/test_source_file/test_source_file.py index 790c662d8..43e8963ec 100644 --- a/tests/test_source_file/test_source_file.py +++ b/tests/test_source_file/test_source_file.py @@ -109,8 +109,10 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run1() - test_statepoint_exists() - test_run2() - test_results() - teardown() + try: + test_run1() + test_statepoint_exists() + test_run2() + test_results() + finally: + teardown() diff --git a/tests/test_source_point/test_source_point.py b/tests/test_source_point/test_source_point.py index bcc3f8a81..6fdbf8745 100644 --- a/tests/test_source_point/test_source_point.py +++ b/tests/test_source_point/test_source_point.py @@ -51,7 +51,9 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_results() + finally: + teardown() diff --git a/tests/test_sourcepoint_batch/test_sourcepoint_batch.py b/tests/test_sourcepoint_batch/test_sourcepoint_batch.py index 28fd9badd..a1c89690b 100644 --- a/tests/test_sourcepoint_batch/test_sourcepoint_batch.py +++ b/tests/test_sourcepoint_batch/test_sourcepoint_batch.py @@ -51,7 +51,9 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_statepoint_exists() - test_results() - teardown() + try: + test_run() + test_statepoint_exists() + test_results() + finally: + teardown() diff --git a/tests/test_sourcepoint_interval/test_sourcepoint_interval.py b/tests/test_sourcepoint_interval/test_sourcepoint_interval.py index c667f8adb..a583370c3 100644 --- a/tests/test_sourcepoint_interval/test_sourcepoint_interval.py +++ b/tests/test_sourcepoint_interval/test_sourcepoint_interval.py @@ -51,7 +51,9 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_statepoint_exists() - test_results() - teardown() + try: + test_run() + test_statepoint_exists() + test_results() + finally: + teardown() diff --git a/tests/test_sourcepoint_latest/test_sourcepoint_latest.py b/tests/test_sourcepoint_latest/test_sourcepoint_latest.py index 198d7a346..8ce55f2c7 100644 --- a/tests/test_sourcepoint_latest/test_sourcepoint_latest.py +++ b/tests/test_sourcepoint_latest/test_sourcepoint_latest.py @@ -56,7 +56,9 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_statepoint_exists() - test_results() - teardown() + try: + test_run() + test_statepoint_exists() + test_results() + finally: + teardown() diff --git a/tests/test_sourcepoint_restart/test_sourcepoint_restart.py b/tests/test_sourcepoint_restart/test_sourcepoint_restart.py index 56237c7f5..d42763be3 100644 --- a/tests/test_sourcepoint_restart/test_sourcepoint_restart.py +++ b/tests/test_sourcepoint_restart/test_sourcepoint_restart.py @@ -133,16 +133,18 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_results() - test_restart_form1() - test_created_statepoint_form1() - test_results_form1() - test_restart_form2() - test_created_statepoint_form2() - test_results_form2() - test_restart_serial() - test_created_statepoint_serial() - test_results_serial() - teardown() + try: + test_run() + test_created_statepoint() + test_results() + test_restart_form1() + test_created_statepoint_form1() + test_results_form1() + test_restart_form2() + test_created_statepoint_form2() + test_results_form2() + test_restart_serial() + test_created_statepoint_serial() + test_results_serial() + finally: + teardown() diff --git a/tests/test_statepoint_batch/test_statepoint_batch.py b/tests/test_statepoint_batch/test_statepoint_batch.py index 678369093..a594b2c5a 100644 --- a/tests/test_statepoint_batch/test_statepoint_batch.py +++ b/tests/test_statepoint_batch/test_statepoint_batch.py @@ -59,7 +59,9 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_statepoints_exist() - test_results() - teardown() + try: + test_run() + test_statepoints_exist() + test_results() + finally: + teardown() diff --git a/tests/test_statepoint_interval/test_statepoint_interval.py b/tests/test_statepoint_interval/test_statepoint_interval.py index 17a91fb3b..b7c30d338 100644 --- a/tests/test_statepoint_interval/test_statepoint_interval.py +++ b/tests/test_statepoint_interval/test_statepoint_interval.py @@ -68,7 +68,9 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_statepoints_exist() - test_results() - teardown() + try: + test_run() + test_statepoints_exist() + test_results() + finally: + teardown() diff --git a/tests/test_statepoint_restart/test_statepoint_restart.py b/tests/test_statepoint_restart/test_statepoint_restart.py index 291fdef80..9473cc692 100644 --- a/tests/test_statepoint_restart/test_statepoint_restart.py +++ b/tests/test_statepoint_restart/test_statepoint_restart.py @@ -122,16 +122,18 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_results() - test_restart_form1() - test_created_statepoint_form1() - test_results_form1() - test_restart_form2() - test_created_statepoint_form2() - test_results_form2() - test_restart_serial() - test_created_statepoint_serial() - test_results_serial() - teardown() + try: + test_run() + test_created_statepoint() + test_results() + test_restart_form1() + test_created_statepoint_form1() + test_results_form1() + test_restart_form2() + test_created_statepoint_form2() + test_results_form2() + test_restart_serial() + test_created_statepoint_serial() + test_results_serial() + finally: + teardown() diff --git a/tests/test_statepoint_sourcesep/test_statepoint_sourcesep.py b/tests/test_statepoint_sourcesep/test_statepoint_sourcesep.py index 79b4bc524..d9a42310d 100644 --- a/tests/test_statepoint_sourcesep/test_statepoint_sourcesep.py +++ b/tests/test_statepoint_sourcesep/test_statepoint_sourcesep.py @@ -56,7 +56,9 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_statepoint_exists() - test_results() - teardown() + try: + test_run() + test_statepoint_exists() + test_results() + finally: + teardown() diff --git a/tests/test_survival_biasing/test_survival_biasing.py b/tests/test_survival_biasing/test_survival_biasing.py index bcc3f8a81..6fdbf8745 100644 --- a/tests/test_survival_biasing/test_survival_biasing.py +++ b/tests/test_survival_biasing/test_survival_biasing.py @@ -51,7 +51,9 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_results() + finally: + teardown() diff --git a/tests/test_tally_assumesep/test_tally_assumesep.py b/tests/test_tally_assumesep/test_tally_assumesep.py index 6e54389fc..962a1ca26 100644 --- a/tests/test_tally_assumesep/test_tally_assumesep.py +++ b/tests/test_tally_assumesep/test_tally_assumesep.py @@ -55,8 +55,10 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_output_exists() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_output_exists() + test_results() + finally: + teardown() diff --git a/tests/test_trace/test_trace.py b/tests/test_trace/test_trace.py index 429939f89..59488412c 100644 --- a/tests/test_trace/test_trace.py +++ b/tests/test_trace/test_trace.py @@ -53,7 +53,9 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_results() + finally: + teardown() diff --git a/tests/test_track_output/test_track_output.py b/tests/test_track_output/test_track_output.py index f550adf8d..e37e2fc0d 100644 --- a/tests/test_track_output/test_track_output.py +++ b/tests/test_track_output/test_track_output.py @@ -55,7 +55,9 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_outputs() - test_outputs() - teardown() + try: + test_run() + test_created_outputs() + test_outputs() + finally: + teardown() diff --git a/tests/test_translation/test_translation.py b/tests/test_translation/test_translation.py index bcc3f8a81..6fdbf8745 100644 --- a/tests/test_translation/test_translation.py +++ b/tests/test_translation/test_translation.py @@ -51,7 +51,9 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_results() + finally: + teardown() diff --git a/tests/test_uniform_fs/test_uniform_fs.py b/tests/test_uniform_fs/test_uniform_fs.py index bcc3f8a81..6fdbf8745 100644 --- a/tests/test_uniform_fs/test_uniform_fs.py +++ b/tests/test_uniform_fs/test_uniform_fs.py @@ -51,7 +51,9 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_results() + finally: + teardown() diff --git a/tests/test_universe/test_universe.py b/tests/test_universe/test_universe.py index bcc3f8a81..6fdbf8745 100644 --- a/tests/test_universe/test_universe.py +++ b/tests/test_universe/test_universe.py @@ -51,7 +51,9 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_results() + finally: + teardown() diff --git a/tests/test_void/test_void.py b/tests/test_void/test_void.py index bcc3f8a81..6fdbf8745 100644 --- a/tests/test_void/test_void.py +++ b/tests/test_void/test_void.py @@ -51,7 +51,9 @@ if __name__ == '__main__': raise Exception('Must specify OpenMC executable from command line with --exe.') # run tests - test_run() - test_created_statepoint() - test_results() - teardown() + try: + test_run() + test_created_statepoint() + test_results() + finally: + teardown()