Consistently use the same Python interpreter when running tests

This commit is contained in:
Paul Romano 2015-06-04 13:53:42 +07:00
parent 77e6baf2b5
commit 085ade9ffc
93 changed files with 188 additions and 95 deletions

View file

@ -1,6 +1,7 @@
#!/usr/bin/env python
import os
import sys
from subprocess import Popen, STDOUT, PIPE, call
import filecmp
import glob
@ -31,7 +32,7 @@ def test_created_statepoint():
def test_results():
statepoint = glob.glob(os.path.join(cwd, 'statepoint.10.*'))
call(['python', 'results.py', statepoint[0]])
call([sys.executable, 'results.py', statepoint[0]])
compare = filecmp.cmp('results_test.dat', 'results_true.dat')
if not compare:
os.rename('results_test.dat', 'results_error.dat')