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

Method test_expat_incremental_reset

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

Source from the content-addressed store, hash-verified

1226
1227 @unittest.expectedFailure # TODO: RUSTPYTHON; AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
1228 def test_expat_incremental_reset(self):
1229 result = BytesIO()
1230 xmlgen = XMLGenerator(result)
1231 parser = create_parser()
1232 parser.setContentHandler(xmlgen)
1233
1234 parser.feed("<doc>")
1235 parser.feed("text")
1236
1237 result = BytesIO()
1238 xmlgen = XMLGenerator(result)
1239 parser.setContentHandler(xmlgen)
1240 parser.reset()
1241
1242 parser.feed("<doc>")
1243 parser.feed("text")
1244 parser.feed("</doc>")
1245 parser.close()
1246
1247 self.assertEqual(result.getvalue(), start + b"<doc>text</doc>")
1248
1249 @unittest.expectedFailure # TODO: RUSTPYTHON; AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
1250 @unittest.skipIf(pyexpat.version_info < (2, 6, 0),

Callers

nothing calls this directly

Calls 9

getvalueMethod · 0.95
BytesIOClass · 0.90
XMLGeneratorClass · 0.90
create_parserFunction · 0.90
setContentHandlerMethod · 0.45
feedMethod · 0.45
resetMethod · 0.45
closeMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected