if passed, test results data file now cleaned up

This commit is contained in:
Bryan Herman 2013-08-12 14:13:54 -04:00
parent 212109e4d0
commit 3d794473ee
4 changed files with 21 additions and 8 deletions

View file

@ -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)