Fix py2.6--use Popen instead of check_output
This commit is contained in:
parent
a82e876f93
commit
18d3b4809f
1 changed files with 10 additions and 4 deletions
|
|
@ -45,9 +45,15 @@ def run(verbosity=1):
|
||||||
|
|
||||||
for test in isolated_tests:
|
for test in isolated_tests:
|
||||||
print(('testing %s' % test).center(80))
|
print(('testing %s' % test).center(80))
|
||||||
term = subprocess.check_output([sys.executable, '-m', test],
|
|
||||||
|
cmd = [sys.executable, '-m', test]
|
||||||
|
p = subprocess.Popen(cmd, stdout=subprocess.PIPE,
|
||||||
stderr=subprocess.STDOUT)
|
stderr=subprocess.STDOUT)
|
||||||
print(term)
|
for line in p.stdout:
|
||||||
|
print(line, end='')
|
||||||
|
p.wait()
|
||||||
|
if p.returncode:
|
||||||
|
raise Exception("%s returned: %d" % p.returncode)
|
||||||
|
|
||||||
return testresult
|
return testresult
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue