Skip to content

Instantly share code, notes, and snippets.

@astrofrog
Created October 14, 2014 08:28
Show Gist options
  • Select an option

  • Save astrofrog/d7be9e4b6bfc474d5a18 to your computer and use it in GitHub Desktop.

Select an option

Save astrofrog/d7be9e4b6bfc474d5a18 to your computer and use it in GitHub Desktop.
import subprocess
g = 0
b = 0
for iteration in range(200):
p = subprocess.Popen('python setup.py test -t astropy/io/ascii/tests/test_c_reader.py'.split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
p.wait()
if p.returncode > 0:
print(p.stdout.read().decode('ascii'))
print(p.stderr.read().decode('ascii'))
b += 1
else:
g += 1
print("{0:03d} {1:3d} {2:3d} {3:6.2f}%".format(iteration + 1, g, b, b / (g + b) * 100.))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment