(self)
| 1030 | doc.unlink() |
| 1031 | |
| 1032 | def testNormalizeCombineAndNextSibling(self): |
| 1033 | doc = parseString("<doc/>") |
| 1034 | root = doc.documentElement |
| 1035 | root.appendChild(doc.createTextNode("first")) |
| 1036 | root.appendChild(doc.createTextNode("second")) |
| 1037 | root.appendChild(doc.createElement("i")) |
| 1038 | self.confirm(len(root.childNodes) == 3 |
| 1039 | and root.childNodes.length == 3, |
| 1040 | "testNormalizeCombineAndNextSibling -- preparation") |
| 1041 | doc.normalize() |
| 1042 | self.confirm(len(root.childNodes) == 2 |
| 1043 | and root.childNodes.length == 2 |
| 1044 | and root.firstChild.data == "firstsecond" |
| 1045 | and root.firstChild is not root.lastChild |
| 1046 | and root.firstChild.nextSibling is root.lastChild |
| 1047 | and root.firstChild.previousSibling is None |
| 1048 | and root.lastChild.previousSibling is root.firstChild |
| 1049 | and root.lastChild.nextSibling is None |
| 1050 | , "testNormalizeCombinedAndNextSibling -- result") |
| 1051 | doc.unlink() |
| 1052 | |
| 1053 | def testNormalizeDeleteWithPrevSibling(self): |
| 1054 | doc = parseString("<doc/>") |
nothing calls this directly
no test coverage detected