Removed error file from teardown scope

Also removed scaffold code
This commit is contained in:
Sterling Harper 2013-10-11 03:18:46 -04:00
parent bfc172f264
commit c1d5725d41

View file

@ -30,28 +30,6 @@ def test_created_outputs():
assert len(files) == 1
assert files[0].endswith('binary') or files[0].endswith('h5')
##def test_outputs():
## outputs = [glob.glob(''.join((pwd, '/track_1_1_1.*')))[0]]
## outputs.append(glob.glob(''.join((pwd, '/track_1_1_2.*')))[0])
## if outputs[0].endswith('binary'):
## metrics = [''.join((pwd, '/track_1_1_1_true.binary')),
## ''.join((pwd, '/track_1_1_2_true.binary'))]
## else:
## metrics = [''.join((pwd, '/track_1_1_1_true.h5')),
## ''.join((pwd, '/track_1_1_2_true.h5'))]
## for i in range(2):
## output = outputs[i]
## metric = metrics[i]
## compare = filecmp.cmp(output, metric)
## if not compare:
## if outputs[0].endswith('binary'):
## extension = 'binary'
## else:
## extension = 'h5'
## os.rename(output, ''.join((pwd, '/track_1_1_{}_error.{}'.format(
## i+1, extension))))
## assert compare
def test_outputs():
call(['../../src/utils/track.py', '-o', 'poly'] +
glob.glob(''.join((pwd, '/track*'))))
@ -60,17 +38,9 @@ def test_outputs():
metric = ''.join((pwd, '/true_poly.pvtp'))
compare = filecmp.cmp(poly, metric)
if not compare:
os.rename('poly.pvtp', 'poly_error.pvtp')
os.rename('poly.pvtp', 'error_poly.pvtp')
assert compare
##def test_results():
## statepoint = glob.glob(pwd + '/statepoint.10.*')
## call(['python', 'results.py', statepoint[0]])
## compare = filecmp.cmp('results_test.dat', 'results_true.dat')
## if not compare:
## os.rename('results_test.dat', 'results_error.dat')
## assert compare
def teardown():
temp_files = glob.glob(''.join((pwd, '/statepoint*')))
temp_files = temp_files + glob.glob(''.join((pwd, '/track*')))