Commit 14ca327f authored by Neal Norwitz's avatar Neal Norwitz

Instead of printing the exception when you interrupt a test (Ctrl-C),

print the status so far and suppress printing the exception (but still exit).
parent a829313d
......@@ -334,7 +334,15 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, generate=False,
tracer.runctx('runtest(test, generate, verbose, quiet, testdir)',
globals=globals(), locals=vars())
else:
ok = runtest(test, generate, verbose, quiet, testdir, huntrleaks)
try:
ok = runtest(test, generate, verbose, quiet, testdir,
huntrleaks)
except KeyboardInterrupt:
# print a newline separate from the ^C
print
break
except:
raise
if ok > 0:
good.append(test)
elif ok == 0:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment