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 ****************** diff --git a/src/ace.F90 b/src/ace.F90 index e3327b2da..d414e21f8 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 @@ -967,24 +972,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 (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 + cycle + end if + end if ! determine length NP = int(XSS(lc + length + 2)) length = length + 2 + 3*NP @@ -993,6 +997,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 +1030,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 (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 + cycle + end if + end if NP = int(XSS(lc + length + 2)) length = length + 2 + 5*NP @@ -1050,29 +1054,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 (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 + cycle + end if + end if + ! outgoing energy distribution NP = int(XSS(lc + length + 2)) @@ -1094,7 +1099,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 +1113,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)) diff --git a/src/physics.F90 b/src/physics.F90 index 7e9e57cb3..48d05fed0 100644 --- a/src/physics.F90 +++ b/src/physics.F90 @@ -1165,7 +1165,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)) 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 51801c4dd..43e8963ec 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) @@ -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()