diff --git a/tests/test_basic/test_basic.py b/tests/test_basic/test_basic.py index 5c5b236f32..2f43cbd3f6 100644 --- a/tests/test_basic/test_basic.py +++ b/tests/test_basic/test_basic.py @@ -21,10 +21,13 @@ def test_created_statepoint(): def test_results(): os.system('python results.py') - assert filecmp.cmp('results_test.dat', 'results_true.dat') + compare = filecmp.cmp('results_test.dat', 'results_true.dat') + if not compare: + os.system('cp results_test.dat results_error.dat') + assert compare def teardown(): - output = [pwd + '/statepoint.10.binary'] + output = [pwd + '/statepoint.10.binary', pwd + '/results_test.dat'] for f in output: if os.path.exists(f): os.remove(f) diff --git a/tests/test_confidence_intervals/test_confidence_intervals.py b/tests/test_confidence_intervals/test_confidence_intervals.py index 33590e0e28..7ccc665679 100644 --- a/tests/test_confidence_intervals/test_confidence_intervals.py +++ b/tests/test_confidence_intervals/test_confidence_intervals.py @@ -24,10 +24,14 @@ def test_created_output(): def test_results(): os.system('python results.py') - assert filecmp.cmp('results_test.dat', 'results_true.dat') + compare = filecmp.cmp('results_test.dat', 'results_true.dat') + if not compare: + os.system('cp results_test.dat results_error.dat') + assert compare def teardown(): - output = [pwd + '/statepoint.10.binary', pwd + '/tallies.out'] + output = [pwd + '/statepoint.10.binary', pwd + '/tallies.out', + pwd + '/results_test.dat'] for f in output: if os.path.exists(f): os.remove(f) diff --git a/tests/test_density_atombcm/test_density_atombcm.py b/tests/test_density_atombcm/test_density_atombcm.py index 5c5b236f32..2f43cbd3f6 100644 --- a/tests/test_density_atombcm/test_density_atombcm.py +++ b/tests/test_density_atombcm/test_density_atombcm.py @@ -21,10 +21,13 @@ def test_created_statepoint(): def test_results(): os.system('python results.py') - assert filecmp.cmp('results_test.dat', 'results_true.dat') + compare = filecmp.cmp('results_test.dat', 'results_true.dat') + if not compare: + os.system('cp results_test.dat results_error.dat') + assert compare def teardown(): - output = [pwd + '/statepoint.10.binary'] + output = [pwd + '/statepoint.10.binary', pwd + '/results_test.dat'] for f in output: if os.path.exists(f): os.remove(f) diff --git a/tests/test_density_atomcm3/test_density_atomcm3.py b/tests/test_density_atomcm3/test_density_atomcm3.py index 5c5b236f32..2f43cbd3f6 100644 --- a/tests/test_density_atomcm3/test_density_atomcm3.py +++ b/tests/test_density_atomcm3/test_density_atomcm3.py @@ -21,10 +21,13 @@ def test_created_statepoint(): def test_results(): os.system('python results.py') - assert filecmp.cmp('results_test.dat', 'results_true.dat') + compare = filecmp.cmp('results_test.dat', 'results_true.dat') + if not compare: + os.system('cp results_test.dat results_error.dat') + assert compare def teardown(): - output = [pwd + '/statepoint.10.binary'] + output = [pwd + '/statepoint.10.binary', pwd + '/results_test.dat'] for f in output: if os.path.exists(f): os.remove(f)