summaryrefslogtreecommitdiffstats
path: root/Lib/test/regrtest.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-03-21 18:55:58 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-03-21 18:55:58 (GMT)
commitc107fb1b59501a4d9de9618e13e8bc8601f76764 (patch)
tree30ab49a92ce201919e75c84faab4a1d2bfa4d445 /Lib/test/regrtest.py
parent59cc6847a907c50afabeba16d67d9092a8ea1f49 (diff)
parent779a5b0b3aac6a5dcd8473f770e1573a48b51f7d (diff)
downloadcpython-c107fb1b59501a4d9de9618e13e8bc8601f76764.zip
cpython-c107fb1b59501a4d9de9618e13e8bc8601f76764.tar.gz
cpython-c107fb1b59501a4d9de9618e13e8bc8601f76764.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 a7a7de3..ab3c502 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -1000,12 +1000,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: