mirror of
https://github.com/python/cpython.git
synced 2025-08-01 15:43:13 +00:00
#1433694: minidom's .normalize() failed to set .nextSibling for last element.
Fix by Malte Helmert
This commit is contained in:
parent
8887e54867
commit
19aff0c90a
3 changed files with 11 additions and 0 deletions
|
@ -791,6 +791,14 @@ class MinidomTest(unittest.TestCase):
|
|||
"testNormalize -- single empty node removed")
|
||||
doc.unlink()
|
||||
|
||||
def testBug1433694(self):
|
||||
doc = parseString("<o><i/>t</o>")
|
||||
node = doc.documentElement
|
||||
node.childNodes[1].nodeValue = ""
|
||||
node.normalize()
|
||||
self.confirm(node.childNodes[-1].nextSibling == None,
|
||||
"Final child's .nextSibling should be None")
|
||||
|
||||
def testSiblings(self):
|
||||
doc = parseString("<doc><?pi?>text?<elm/></doc>")
|
||||
root = doc.documentElement
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue