(self)
| 1018 | self.check_clone_node_entity(True) |
| 1019 | |
| 1020 | def testNormalize(self): |
| 1021 | doc = parseString("<doc/>") |
| 1022 | root = doc.documentElement |
| 1023 | root.appendChild(doc.createTextNode("first")) |
| 1024 | root.appendChild(doc.createTextNode("second")) |
| 1025 | self.confirm(len(root.childNodes) == 2 |
| 1026 | and root.childNodes.length == 2, |
| 1027 | "testNormalize -- preparation") |
| 1028 | doc.normalize() |
| 1029 | self.confirm(len(root.childNodes) == 1 |
| 1030 | and root.childNodes.length == 1 |
| 1031 | and root.firstChild is root.lastChild |
| 1032 | and root.firstChild.data == "firstsecond" |
| 1033 | , "testNormalize -- result") |
| 1034 | doc.unlink() |
| 1035 | |
| 1036 | doc = parseString("<doc/>") |
| 1037 | root = doc.documentElement |
| 1038 | root.appendChild(doc.createTextNode("")) |
| 1039 | doc.normalize() |
| 1040 | self.confirm(len(root.childNodes) == 0 |
| 1041 | and root.childNodes.length == 0, |
| 1042 | "testNormalize -- single empty node removed") |
| 1043 | doc.unlink() |
| 1044 | |
| 1045 | def testNormalizeCombineAndNextSibling(self): |
| 1046 | doc = parseString("<doc/>") |
nothing calls this directly
no test coverage detected