(self)
| 1472 | doc.unlink() |
| 1473 | |
| 1474 | def testWholeText(self): |
| 1475 | doc = parseString("<doc>a</doc>") |
| 1476 | elem = doc.documentElement |
| 1477 | text = elem.childNodes[0] |
| 1478 | self.assertEqual(text.nodeType, Node.TEXT_NODE) |
| 1479 | |
| 1480 | self.checkWholeText(text, "a") |
| 1481 | elem.appendChild(doc.createTextNode("b")) |
| 1482 | self.checkWholeText(text, "ab") |
| 1483 | elem.insertBefore(doc.createCDATASection("c"), text) |
| 1484 | self.checkWholeText(text, "cab") |
| 1485 | |
| 1486 | # make sure we don't cross other nodes |
| 1487 | splitter = doc.createComment("comment") |
| 1488 | elem.appendChild(splitter) |
| 1489 | text2 = doc.createTextNode("d") |
| 1490 | elem.appendChild(text2) |
| 1491 | self.checkWholeText(text, "cab") |
| 1492 | self.checkWholeText(text2, "d") |
| 1493 | |
| 1494 | x = doc.createElement("x") |
| 1495 | elem.replaceChild(x, splitter) |
| 1496 | splitter = x |
| 1497 | self.checkWholeText(text, "cab") |
| 1498 | self.checkWholeText(text2, "d") |
| 1499 | |
| 1500 | x = doc.createProcessingInstruction("y", "z") |
| 1501 | elem.replaceChild(x, splitter) |
| 1502 | splitter = x |
| 1503 | self.checkWholeText(text, "cab") |
| 1504 | self.checkWholeText(text2, "d") |
| 1505 | |
| 1506 | elem.removeChild(splitter) |
| 1507 | self.checkWholeText(text, "cabd") |
| 1508 | self.checkWholeText(text2, "cabd") |
| 1509 | |
| 1510 | def testPatch1094164(self): |
| 1511 | doc = parseString("<doc><e/></doc>") |
nothing calls this directly
no test coverage detected