found_it = True
sys.stdin.readline() // skip the next one
line = sys.stdin.readline()
if "OK" in line:
status = True
break
if found_it:
// did it errored or failed?
After Change
"fast": 17738}
// read in the log, parse for the pytest printout
r1 = re.compile("(?P<num_failed>\d+) failed, (?P<num_passed>\d+) passed,.* in (?P<time>\d+\S+)")
r2 = re.compile("(?P<num_passed>\d+) passed,.* in (?P<time>\d+\S+)")
found_it = False
while True:
line = sys.stdin.readline()
if not line:
break
m = r1.search(line)
if not m:
m = r2.search(line)
if m:
found_it = True
break
if found_it:
passed = int(m.group("num_passed"))
try:
failed = int(m.group("num_failed"))
except IndexError:
failed = 0
if failed:
print("*** Looks like some tests failed.")
sys.exit(-1)
// now check that the number of tests run is reasonable
expected = expected_size[testmode]
actual = passed + failed
if actual < expected:
print("*** Too few tests: expected %s, run %s" % (expected, actual))
sys.exit(1)
else: