Always print out the traceback when a test "crashed"

This commit is contained in:
Antoine Pitrou 2011-03-21 19:55:16 +01:00
parent 46719af05a
commit 779a5b0b3a
1 changed files with 2 additions and 5 deletions

View File

@ -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: