(self)
| 607 | self.assertEqual(domstr, str.replace("\n", "\r\n")) |
| 608 | |
| 609 | def test_toprettyxml_with_text_nodes(self): |
| 610 | # see issue #4147, text nodes are not indented |
| 611 | decl = '<?xml version="1.0" ?>\n' |
| 612 | self.assertEqual(parseString('<B>A</B>').toprettyxml(), |
| 613 | decl + '<B>A</B>\n') |
| 614 | self.assertEqual(parseString('<C>A<B>A</B></C>').toprettyxml(), |
| 615 | decl + '<C>\n\tA\n\t<B>A</B>\n</C>\n') |
| 616 | self.assertEqual(parseString('<C><B>A</B>A</C>').toprettyxml(), |
| 617 | decl + '<C>\n\t<B>A</B>\n\tA\n</C>\n') |
| 618 | self.assertEqual(parseString('<C><B>A</B><B>A</B></C>').toprettyxml(), |
| 619 | decl + '<C>\n\t<B>A</B>\n\t<B>A</B>\n</C>\n') |
| 620 | self.assertEqual(parseString('<C><B>A</B>A<B>A</B></C>').toprettyxml(), |
| 621 | decl + '<C>\n\t<B>A</B>\n\tA\n\t<B>A</B>\n</C>\n') |
| 622 | |
| 623 | def test_toprettyxml_with_adjacent_text_nodes(self): |
| 624 | # see issue #4147, adjacent text nodes are indented normally |
nothing calls this directly
no test coverage detected