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

Method test_expat_inpsource_byte_stream

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

Source from the content-addressed store, hash-verified

1156 self.assertEqual(result.getvalue(), xml_test_out)
1157
1158 def test_expat_inpsource_byte_stream(self):
1159 parser = create_parser()
1160 result = BytesIO()
1161 xmlgen = XMLGenerator(result)
1162
1163 parser.setContentHandler(xmlgen)
1164 inpsrc = InputSource()
1165 with open(TEST_XMLFILE, 'rb') as f:
1166 inpsrc.setByteStream(f)
1167 parser.parse(inpsrc)
1168
1169 self.assertEqual(result.getvalue(), xml_test_out)
1170
1171 def test_expat_inpsource_character_stream(self):
1172 parser = create_parser()

Callers

nothing calls this directly

Calls 10

setByteStreamMethod · 0.95
getvalueMethod · 0.95
create_parserFunction · 0.90
BytesIOClass · 0.90
XMLGeneratorClass · 0.90
InputSourceClass · 0.90
openFunction · 0.50
setContentHandlerMethod · 0.45
parseMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected