Skip to content

Instantly share code, notes, and snippets.

@tylerjereddy
Last active September 22, 2018 00:07
Show Gist options
  • Save tylerjereddy/b36bc44b4047245d9ba92a663c746246 to your computer and use it in GitHub Desktop.
Save tylerjereddy/b36bc44b4047245d9ba92a663c746246 to your computer and use it in GitHub Desktop.
NumPy warnings parallel test fidelity probe
import subprocess
trials = 20
pass_counts = 0
fail_counts = 0
for i in range(trials):
print("trial number:", i)
try:
o = subprocess.check_output('python runtests.py -t "numpy/testing/tests/test_utils.py" -- -n 4', shell=True)
except subprocess.CalledProcessError as exc:
o = exc.output
if b'FAILURES' in o:
fail_counts += 1
else:
pass_counts += 1
print("pass_counts", pass_counts)
print("fail_counts", fail_counts)
print("trials", trials)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment