]> granicus.if.org Git - python/commitdiff
Update the test suite to cover more ground.
authorFred Drake <fdrake@acm.org>
Thu, 14 Dec 2000 18:20:22 +0000 (18:20 +0000)
committerFred Drake <fdrake@acm.org>
Thu, 14 Dec 2000 18:20:22 +0000 (18:20 +0000)
This closes patch #102477.

Lib/test/output/test_minidom
Lib/test/test_minidom.py

index 6373ef67ca2d42c625fab36bf716ee173be49859..82cab3efa66b4ddf3bc2d6ba6da7384688198028 100644 (file)
@@ -127,6 +127,7 @@ Test Succeeded testNonZero
 Passed assertion: len(Node.allnodes) == 0
 Passed testNormalize -- preparation
 Passed testNormalize -- result
+Passed testNormalize -- single empty node removed
 Test Succeeded testNormalize
 Passed assertion: len(Node.allnodes) == 0
 Passed testParents
index 5bdee808412478d7fb04f6c3afa5d7e87f6a5e1e..551e9f9aa9b4d2ead9f1dbaf091fb4b770a47d86 100644 (file)
@@ -397,6 +397,14 @@ def testNormalize():
             , "testNormalize -- result")
     doc.unlink()
 
+    doc = parseString("<doc/>")
+    root = doc.documentElement
+    root.appendChild(doc.createTextNode(""))
+    doc.normalize()
+    confirm(len(root.childNodes) == 0,
+            "testNormalize -- single empty node removed")
+    doc.unlink()
+
 def testSiblings():
     doc = parseString("<doc><?pi?>text?<elm/></doc>")
     root = doc.documentElement