(self)
| 1005 | self.check_clone_node_entity(True) |
| 1006 | |
| 1007 | def testNormalize(self): |
| 1008 | doc = parseString("<doc/>") |
| 1009 | root = doc.documentElement |
| 1010 | root.appendChild(doc.createTextNode("first")) |
| 1011 | root.appendChild(doc.createTextNode("second")) |
| 1012 | self.confirm(len(root.childNodes) == 2 |
| 1013 | and root.childNodes.length == 2, |
| 1014 | "testNormalize -- preparation") |
| 1015 | doc.normalize() |
| 1016 | self.confirm(len(root.childNodes) == 1 |
| 1017 | and root.childNodes.length == 1 |
| 1018 | and root.firstChild is root.lastChild |
| 1019 | and root.firstChild.data == "firstsecond" |
| 1020 | , "testNormalize -- result") |
| 1021 | doc.unlink() |
| 1022 | |
| 1023 | doc = parseString("<doc/>") |
| 1024 | root = doc.documentElement |
| 1025 | root.appendChild(doc.createTextNode("")) |
| 1026 | doc.normalize() |
| 1027 | self.confirm(len(root.childNodes) == 0 |
| 1028 | and root.childNodes.length == 0, |
| 1029 | "testNormalize -- single empty node removed") |
| 1030 | doc.unlink() |
| 1031 | |
| 1032 | def testNormalizeCombineAndNextSibling(self): |
| 1033 | doc = parseString("<doc/>") |
nothing calls this directly
no test coverage detected