projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a829313
)
Instead of printing the exception when you interrupt a test (Ctrl-C),
author
Neal Norwitz
<nnorwitz@gmail.com>
Tue, 28 Feb 2006 18:05:43 +0000
(18:05 +0000)
committer
Neal Norwitz
<nnorwitz@gmail.com>
Tue, 28 Feb 2006 18:05:43 +0000
(18:05 +0000)
print the status so far and suppress printing the exception (but still exit).
Lib/test/regrtest.py
patch
|
blob
|
history
diff --git
a/Lib/test/regrtest.py
b/Lib/test/regrtest.py
index 1734eba4b2c78f9f06940af917900a12be8d2ff4..e7601c878178975bb86b2d7ffe4d1a6159a98808 100755
(executable)
--- a/
Lib/test/regrtest.py
+++ b/
Lib/test/regrtest.py
@@
-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: