summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_minidom.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2000-09-21 20:10:39 (GMT)
committerGuido van Rossum <guido@python.org>2000-09-21 20:10:39 (GMT)
commit9e79a25b8ad32ff45ae2897ad1f25529eba7721f (patch)
tree6759d2fdb2df6fd8582aea9fbea39cea985da2bb /Lib/test/test_minidom.py
parentca1f4260805bba12db6b420cec654a659d0bc4df (diff)
downloadcpython-9e79a25b8ad32ff45ae2897ad1f25529eba7721f.zip
cpython-9e79a25b8ad32ff45ae2897ad1f25529eba7721f.tar.gz
cpython-9e79a25b8ad32ff45ae2897ad1f25529eba7721f.tar.bz2
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.)
Diffstat (limited to 'Lib/test/test_minidom.py')
-rw-r--r--Lib/test/test_minidom.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_minidom.py b/Lib/test/test_minidom.py
index 05612b2..3c47b0b 100644
--- a/Lib/test/test_minidom.py
+++ b/Lib/test/test_minidom.py
@@ -356,3 +356,5 @@ if works:
else:
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