(self)
| 2559 | self.check_expat224_utf8_bug(text) |
| 2560 | |
| 2561 | def test_expat224_utf8_bug_file(self): |
| 2562 | with open(UTF8_BUG_XMLFILE, 'rb') as fp: |
| 2563 | raw = fp.read() |
| 2564 | root = ET.fromstring(raw) |
| 2565 | xmlattr = root.get('b') |
| 2566 | |
| 2567 | # "Parse" manually the XML file to extract the value of the 'b' |
| 2568 | # attribute of the <a b='xxx' /> XML element |
| 2569 | text = raw.decode('utf-8').strip() |
| 2570 | text = text.replace('\r\n', ' ') |
| 2571 | text = text[6:-4] |
| 2572 | self.assertEqual(root.get('b'), text) |
| 2573 | |
| 2574 | def test_39495_treebuilder_start(self): |
| 2575 | self.assertRaises(TypeError, ET.TreeBuilder().start, "tag") |
nothing calls this directly
no test coverage detected