[Python-checkins] CVS: python/dist/src/Lib/test test_minidom.py,1.5,1.6
Guido van Rossum
python-dev@python.org
Thu, 21 Sep 2000 13:10:42 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory slayer.i.sourceforge.net:/tmp/cvs-serv17328
Modified Files:
test_minidom.py
Log Message:
The minidom.Node class has a debug attribute which, when its _debug
flag is true, is set to a StringIO object that silently collects all
debug messages. This is triggered by the Node._debug=1 statement at
the top of test_minidom.py. After the tests, we better delete that
StringIO object to avoid wasting memory. We also reset the _debug
flag. (Note that this is an undetectable memory leak, and the memory
doesn't get collected by the cycle-gc either, because it's all
reachable -- it's just useless.)
Index: test_minidom.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_minidom.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** test_minidom.py 2000/09/19 19:33:01 1.5
--- test_minidom.py 2000/09/21 20:10:39 1.6
***************
*** 357,358 ****
--- 357,360 ----
print "\n\n\n\n************ Check for failures!"
+ Node.debug = None # Delete debug output collected in a StringIO object
+ Node._debug = 0 # And reset debug mode