MCPcopy Index your code
hub / github.com/python/cpython / test_expat_incremental

Method test_expat_incremental

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

Source from the content-addressed store, hash-verified

1184 # ===== IncrementalParser support
1185
1186 def test_expat_incremental(self):
1187 result = BytesIO()
1188 xmlgen = XMLGenerator(result)
1189 parser = create_parser()
1190 parser.setContentHandler(xmlgen)
1191
1192 parser.feed("<doc>")
1193 parser.feed("</doc>")
1194 parser.close()
1195
1196 self.assertEqual(result.getvalue(), start + b"<doc></doc>")
1197
1198 def test_expat_incremental_reset(self):
1199 result = BytesIO()

Callers

nothing calls this directly

Calls 8

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

Tested by

no test coverage detected