MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_expat_dtdhandler

Method test_expat_dtdhandler

Lib/test/test_sax.py:987–1001  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

985
986 @unittest.expectedFailure # TODO: RUSTPYTHON; AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
987 def test_expat_dtdhandler(self):
988 parser = create_parser()
989 handler = self.TestDTDHandler()
990 parser.setDTDHandler(handler)
991
992 parser.feed('<!DOCTYPE doc [\n')
993 parser.feed(' <!ENTITY img SYSTEM "expat.gif" NDATA GIF>\n')
994 parser.feed(' <!NOTATION GIF PUBLIC "-//CompuServe//NOTATION Graphics Interchange Format 89a//EN">\n')
995 parser.feed(']>\n')
996 parser.feed('<doc></doc>')
997 parser.close()
998
999 self.assertEqual(handler._notations,
1000 [("GIF", "-//CompuServe//NOTATION Graphics Interchange Format 89a//EN", None)])
1001 self.assertEqual(handler._entities, [("img", None, "expat.gif", "GIF")])
1002
1003 @unittest.expectedFailure # TODO: RUSTPYTHON; AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
1004 def test_expat_external_dtd_enabled(self):

Callers

nothing calls this directly

Calls 5

create_parserFunction · 0.90
setDTDHandlerMethod · 0.80
feedMethod · 0.45
closeMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected