(self)
| 609 | self.assertEqual(ids["body"].tag, 'body') |
| 610 | |
| 611 | def test_writefile(self): |
| 612 | elem = ET.Element("tag") |
| 613 | elem.text = "text" |
| 614 | self.serialize_check(elem, '<tag>text</tag>') |
| 615 | ET.SubElement(elem, "subtag").text = "subtext" |
| 616 | self.serialize_check(elem, '<tag>text<subtag>subtext</subtag></tag>') |
| 617 | |
| 618 | # Test tag suppression |
| 619 | elem.tag = None |
| 620 | self.serialize_check(elem, 'text<subtag>subtext</subtag>') |
| 621 | elem.insert(0, ET.Comment("comment")) |
| 622 | self.serialize_check(elem, |
| 623 | 'text<!--comment--><subtag>subtext</subtag>') # assumes 1.3 |
| 624 | |
| 625 | elem[0] = ET.PI("key", "value") |
| 626 | self.serialize_check(elem, 'text<?key value?><subtag>subtext</subtag>') |
| 627 | |
| 628 | def test_custom_builder(self): |
| 629 | # Test parser w. custom builder. |
nothing calls this directly
no test coverage detected