File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -127,6 +127,7 @@ Test Succeeded testNonZero
127127Passed assertion: len(Node.allnodes) == 0
128128Passed testNormalize -- preparation
129129Passed testNormalize -- result
130+ Passed testNormalize -- single empty node removed
130131Test Succeeded testNormalize
131132Passed assertion: len(Node.allnodes) == 0
132133Passed testParents
Original file line number Diff line number Diff line change @@ -397,6 +397,14 @@ def testNormalize():
397397 , "testNormalize -- result" )
398398 doc .unlink ()
399399
400+ doc = parseString ("<doc/>" )
401+ root = doc .documentElement
402+ root .appendChild (doc .createTextNode ("" ))
403+ doc .normalize ()
404+ confirm (len (root .childNodes ) == 0 ,
405+ "testNormalize -- single empty node removed" )
406+ doc .unlink ()
407+
400408def testSiblings ():
401409 doc = parseString ("<doc><?pi?>text?<elm/></doc>" )
402410 root = doc .documentElement
You can’t perform that action at this time.
0 commit comments