(self)
| 2330 | self.assertRaises(OSError, ET.parse, ExceptionFile()) |
| 2331 | |
| 2332 | def test_bug_xmltoolkit62(self): |
| 2333 | # Don't crash when using custom entities. |
| 2334 | |
| 2335 | ENTITIES = {'rsquo': '\u2019', 'lsquo': '\u2018'} |
| 2336 | parser = ET.XMLParser() |
| 2337 | parser.entity.update(ENTITIES) |
| 2338 | parser.feed("""<?xml version="1.0" encoding="UTF-8"?> |
| 2339 | <!DOCTYPE patent-application-publication SYSTEM "pap-v15-2001-01-31.dtd" []> |
| 2340 | <patent-application-publication> |
| 2341 | <subdoc-abstract> |
| 2342 | <paragraph id="A-0001" lvl="0">A new cultivar of Begonia plant named ‘BCT9801BEG’.</paragraph> |
| 2343 | </subdoc-abstract> |
| 2344 | </patent-application-publication>""") |
| 2345 | t = parser.close() |
| 2346 | self.assertEqual(t.find('.//paragraph').text, |
| 2347 | 'A new cultivar of Begonia plant named \u2018BCT9801BEG\u2019.') |
| 2348 | |
| 2349 | @unittest.skipIf(sys.gettrace(), "Skips under coverage.") |
| 2350 | def test_bug_xmltoolkit63(self): |
nothing calls this directly
no test coverage detected