Catch all exceptions in test modules.

This commit is contained in:
Guido van Rossum 1997-07-16 01:56:13 +00:00
parent 65cd989441
commit 9e48b272b9
1 changed files with 6 additions and 0 deletions

View File

@ -25,6 +25,7 @@ import sys
import string
import os
import getopt
import traceback
import test_support
@ -137,6 +138,11 @@ def runtest(test, generate, verbose2):
except test_support.TestFailed, msg:
print "test", test, "failed --", msg
return 0
except:
print "test", test, "crashed --", sys.exc_type, ":", sys.exc_value
if verbose2:
traceback.print_exc(file=sys.stdout)
return 0
else:
return 1