From 3277da0f33ff8e1e7e328c0dc491b1a635894252 Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Thu, 14 Dec 2000 18:20:22 +0000 Subject: Update the test suite to cover more ground. This closes patch #102477. --- Lib/test/output/test_minidom | 1 + Lib/test/test_minidom.py | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/Lib/test/output/test_minidom b/Lib/test/output/test_minidom index 6373ef6..82cab3e 100644 --- a/Lib/test/output/test_minidom +++ b/Lib/test/output/test_minidom @@ -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 diff --git a/Lib/test/test_minidom.py b/Lib/test/test_minidom.py index 5bdee80..551e9f9 100644 --- a/Lib/test/test_minidom.py +++ b/Lib/test/test_minidom.py @@ -397,6 +397,14 @@ def testNormalize(): , "testNormalize -- result") doc.unlink() + doc = parseString("") + 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("text?") root = doc.documentElement -- cgit v0.12