(self)
| 718 | |
| 719 | @unittest.expectedFailure # TODO: RUSTPYTHON; AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing' |
| 720 | def test_5027_1(self): |
| 721 | # The xml prefix (as in xml:lang below) is reserved and bound by |
| 722 | # definition to http://www.w3.org/XML/1998/namespace. XMLGenerator had |
| 723 | # a bug whereby a KeyError is raised because this namespace is missing |
| 724 | # from a dictionary. |
| 725 | # |
| 726 | # This test demonstrates the bug by parsing a document. |
| 727 | test_xml = StringIO( |
| 728 | '<?xml version="1.0"?>' |
| 729 | '<a:g1 xmlns:a="http://example.com/ns">' |
| 730 | '<a:g2 xml:lang="en">Hello</a:g2>' |
| 731 | '</a:g1>') |
| 732 | |
| 733 | parser = make_parser() |
| 734 | parser.setFeature(feature_namespaces, True) |
| 735 | result = self.ioclass() |
| 736 | gen = XMLGenerator(result) |
| 737 | parser.setContentHandler(gen) |
| 738 | parser.parse(test_xml) |
| 739 | |
| 740 | self.assertEqual(result.getvalue(), |
| 741 | self.xml( |
| 742 | '<a:g1 xmlns:a="http://example.com/ns">' |
| 743 | '<a:g2 xml:lang="en">Hello</a:g2>' |
| 744 | '</a:g1>')) |
| 745 | |
| 746 | def test_5027_2(self): |
| 747 | # The xml prefix (as in xml:lang below) is reserved and bound by |
nothing calls this directly
no test coverage detected