Commit 3277da0f authored by Fred Drake's avatar Fred Drake

Update the test suite to cover more ground.

This closes patch #102477.
parent f7cf40d3
...@@ -127,6 +127,7 @@ Test Succeeded testNonZero ...@@ -127,6 +127,7 @@ Test Succeeded testNonZero
Passed assertion: len(Node.allnodes) == 0 Passed assertion: len(Node.allnodes) == 0
Passed testNormalize -- preparation Passed testNormalize -- preparation
Passed testNormalize -- result Passed testNormalize -- result
Passed testNormalize -- single empty node removed
Test Succeeded testNormalize Test Succeeded testNormalize
Passed assertion: len(Node.allnodes) == 0 Passed assertion: len(Node.allnodes) == 0
Passed testParents Passed testParents
......
...@@ -397,6 +397,14 @@ def testNormalize(): ...@@ -397,6 +397,14 @@ def testNormalize():
, "testNormalize -- result") , "testNormalize -- result")
doc.unlink() 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(): def testSiblings():
doc = parseString("<doc><?pi?>text?<elm/></doc>") doc = parseString("<doc><?pi?>text?<elm/></doc>")
root = doc.documentElement root = doc.documentElement
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment