summaryrefslogtreecommitdiffstats
path: root/Lib/test/regrtest.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-03-21 18:55:16 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-03-21 18:55:16 (GMT)
commit779a5b0b3aac6a5dcd8473f770e1573a48b51f7d (patch)
tree8e456dda337eba80c667cdbae8a49962241d36a6 /Lib/test/regrtest.py
parent46719af05af7bd016b186ddbad74cd4a22b4aeb1 (diff)
downloadcpython-779a5b0b3aac6a5dcd8473f770e1573a48b51f7d.zip
cpython-779a5b0b3aac6a5dcd8473f770e1573a48b51f7d.tar.gz
cpython-779a5b0b3aac6a5dcd8473f770e1573a48b51f7d.tar.bz2
Always print out the traceback when a test "crashed"
Diffstat (limited to 'Lib/test/regrtest.py')
-rwxr-xr-xLib/test/regrtest.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index 440c09c..238f276 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -995,12 +995,9 @@ def runtest_inner(test, verbose, quiet, huntrleaks=False, debug=False):
sys.stderr.flush()
return FAILED, test_time
except:
- type, value = sys.exc_info()[:2]
- print("test", test, "crashed --", str(type) + ":", value, file=sys.stderr)
+ msg = traceback.format_exc()
+ print("test", test, "crashed --", msg, file=sys.stderr)
sys.stderr.flush()
- if verbose or debug:
- traceback.print_exc(file=sys.stderr)
- sys.stderr.flush()
return FAILED, test_time
else:
if refleak: