Skip to content

Instantly share code, notes, and snippets.

@reynir
Created April 14, 2015 11:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reynir/6616b43999449f26d299 to your computer and use it in GitHub Desktop.
Save reynir/6616b43999449f26d299 to your computer and use it in GitHub Desktop.
ptyprocess
from ptyprocess import PtyProcess
p = PtyProcess.spawn(["/bin/true"])
p.wait()
#/bin/sh
failed=0
for i in `seq 100`; do
if ! python test.py >/dev/null 2>/dev/null; then
failed=$(($failed+1))
fi
done
echo "Test script failed $failed times"
@reynir
Copy link
Author

reynir commented Apr 14, 2015

$ ./test.sh
Test script failed 11 times

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment