diff options
author | Fred Drake <fdrake@acm.org> | 2001-02-01 18:11:29 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2001-02-01 18:11:29 (GMT) |
commit | acfb3f6006a3b1c282d6949224ee39a1e8717056 (patch) | |
tree | 28b81b55b91902a9ba51ca19a58e7595c61a210b | |
parent | d0946da7015471f8f28b7798f267609f5e74b367 (diff) | |
download | cpython-acfb3f6006a3b1c282d6949224ee39a1e8717056.zip cpython-acfb3f6006a3b1c282d6949224ee39a1e8717056.tar.gz cpython-acfb3f6006a3b1c282d6949224ee39a1e8717056.tar.bz2 |
Revise the driver code to be more informative in the final report.
-rw-r--r-- | Lib/test/test_minidom.py | 17 |
1 files 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 |