(self)
| 1456 | doc.unlink() |
| 1457 | |
| 1458 | def testWholeText(self): |
| 1459 | doc = parseString("<doc>a</doc>") |
| 1460 | elem = doc.documentElement |
| 1461 | text = elem.childNodes[0] |
| 1462 | self.assertEqual(text.nodeType, Node.TEXT_NODE) |
| 1463 | |
| 1464 | self.checkWholeText(text, "a") |
| 1465 | elem.appendChild(doc.createTextNode("b")) |
| 1466 | self.checkWholeText(text, "ab") |
| 1467 | elem.insertBefore(doc.createCDATASection("c"), text) |
| 1468 | self.checkWholeText(text, "cab") |
| 1469 | |
| 1470 | # make sure we don't cross other nodes |
| 1471 | splitter = doc.createComment("comment") |
| 1472 | elem.appendChild(splitter) |
| 1473 | text2 = doc.createTextNode("d") |
| 1474 | elem.appendChild(text2) |
| 1475 | self.checkWholeText(text, "cab") |
| 1476 | self.checkWholeText(text2, "d") |
| 1477 | |
| 1478 | x = doc.createElement("x") |
| 1479 | elem.replaceChild(x, splitter) |
| 1480 | splitter = x |
| 1481 | self.checkWholeText(text, "cab") |
| 1482 | self.checkWholeText(text2, "d") |
| 1483 | |
| 1484 | x = doc.createProcessingInstruction("y", "z") |
| 1485 | elem.replaceChild(x, splitter) |
| 1486 | splitter = x |
| 1487 | self.checkWholeText(text, "cab") |
| 1488 | self.checkWholeText(text2, "d") |
| 1489 | |
| 1490 | elem.removeChild(splitter) |
| 1491 | self.checkWholeText(text, "cabd") |
| 1492 | self.checkWholeText(text2, "cabd") |
| 1493 | |
| 1494 | def testPatch1094164(self): |
| 1495 | doc = parseString("<doc><e/></doc>") |
nothing calls this directly
no test coverage detected