From acfb3f6006a3b1c282d6949224ee39a1e8717056 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Thu, 1 Feb 2001 18:11:29 +0000 Subject: Revise the driver code to be more informative in the final report. --- Lib/test/test_minidom.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Lib/test/test_minidom.py b/Lib/test/test_minidom.py index 3407209..002b036 100644 --- a/Lib/test/test_minidom.py +++ b/Lib/test/test_minidom.py @@ -500,7 +500,7 @@ def testSAX2DOM(): names = globals().keys() names.sort() -works = 1 +failed = [] for name in names: if name.startswith("test"): @@ -519,18 +519,21 @@ for name in names: # are needed print len(Node.allnodes) Node.allnodes = {} - except Exception, e: - works = 0 + except: + failed.append(name) print "Test Failed: ", name sys.stdout.flush() traceback.print_exception(*sys.exc_info()) - print `e` + print `sys.exc_info()[1]` Node.allnodes = {} -if works: - print "All tests succeeded" +if failed: + print "\n\n\n**** Check for failures in these tests:" + for name in failed: + print " " + name + print else: - print "\n\n\n\n************ Check for failures!" + print "All tests succeeded" Node.debug = None # Delete debug output collected in a StringIO object Node._debug = 0 # And reset debug mode -- cgit v0.12