From cbb4c1aeb971a67b2f2d961d2a88c6cd2e5da2b7 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Tue, 27 May 2014 16:51:52 -0400 Subject: [PATCH] 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()