MCPcopy Index your code
hub / github.com/python/cpython / testNormalizeDeleteWithPrevSibling

Method testNormalizeDeleteWithPrevSibling

Lib/test/test_minidom.py:1053–1069  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1051 doc.unlink()
1052
1053 def testNormalizeDeleteWithPrevSibling(self):
1054 doc = parseString("<doc/>")
1055 root = doc.documentElement
1056 root.appendChild(doc.createTextNode("first"))
1057 root.appendChild(doc.createTextNode(""))
1058 self.confirm(len(root.childNodes) == 2
1059 and root.childNodes.length == 2,
1060 "testNormalizeDeleteWithPrevSibling -- preparation")
1061 doc.normalize()
1062 self.confirm(len(root.childNodes) == 1
1063 and root.childNodes.length == 1
1064 and root.firstChild.data == "first"
1065 and root.firstChild is root.lastChild
1066 and root.firstChild.nextSibling is None
1067 and root.firstChild.previousSibling is None
1068 , "testNormalizeDeleteWithPrevSibling -- result")
1069 doc.unlink()
1070
1071 def testNormalizeDeleteWithNextSibling(self):
1072 doc = parseString("<doc/>")

Callers

nothing calls this directly

Calls 6

confirmMethod · 0.95
parseStringFunction · 0.90
createTextNodeMethod · 0.80
appendChildMethod · 0.45
normalizeMethod · 0.45
unlinkMethod · 0.45

Tested by

no test coverage detected