diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2000-09-19 16:22:10 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2000-09-19 16:22:10 (GMT) |
commit | 89c528b02d5fad6a211f3f9e6915677e1baa7806 (patch) | |
tree | 9d8315eefefcd4ba5dfb2cc3670344fc0d85935b /Lib/test/test_minidom.py | |
parent | 02c7082745f0d99ac9951a9ea0a1f07eaf8271d8 (diff) | |
download | cpython-89c528b02d5fad6a211f3f9e6915677e1baa7806.zip cpython-89c528b02d5fad6a211f3f9e6915677e1baa7806.tar.gz cpython-89c528b02d5fad6a211f3f9e6915677e1baa7806.tar.bz2 |
Don't print specific Node instances unless running verbosely.
Closes Bug #114775.
Diffstat (limited to 'Lib/test/test_minidom.py')
-rw-r--r-- | Lib/test/test_minidom.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Lib/test/test_minidom.py b/Lib/test/test_minidom.py index 7cddf4b..bc62ec3 100644 --- a/Lib/test/test_minidom.py +++ b/Lib/test/test_minidom.py @@ -5,6 +5,7 @@ from xml.dom.minidom import parse, Node, Document, parseString import os.path import sys import traceback +from test_support import verbose if __name__ == "__main__": base = sys.argv[0] @@ -25,7 +26,7 @@ Node._debug=1 def testParseFromFile(): from StringIO import StringIO dom=parse( StringIO( open( tstfile ).read() ) ) - print dom + confirm(isinstance(dom,Document)) def testGetElementsByTagName( ): dom=parse( tstfile ) @@ -335,7 +336,12 @@ for name in names: print "Test Succeeded", name if len( Node.allnodes ): print "Garbage left over:" - print Node.allnodes.items()[0:10] + if verbose: + print Node.allnodes.items()[0:10] + else: + # Don't print specific nodes if repeatable results + # are needed + print len(Node.allnodes) Node.allnodes={} except Exception, e : works=0 |