[Python-checkins] r42659 - python/trunk/Lib/test/regrtest.py
neal.norwitz
python-checkins at python.org
Tue Feb 28 19:05:44 CET 2006
Author: neal.norwitz
Date: Tue Feb 28 19:05:43 2006
New Revision: 42659
Modified:
python/trunk/Lib/test/regrtest.py
Log:
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).
Modified: python/trunk/Lib/test/regrtest.py
==============================================================================
--- python/trunk/Lib/test/regrtest.py (original)
+++ python/trunk/Lib/test/regrtest.py Tue Feb 28 19:05:43 2006
@@ -334,7 +334,15 @@
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:
More information about the Python-checkins
mailing list