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

Method test_expat_binary_file

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

Source from the content-addressed store, hash-verified

883 # ===== XMLReader support
884
885 def test_expat_binary_file(self):
886 parser = create_parser()
887 result = BytesIO()
888 xmlgen = XMLGenerator(result)
889
890 parser.setContentHandler(xmlgen)
891 with open(TEST_XMLFILE, 'rb') as f:
892 parser.parse(f)
893
894 self.assertEqual(result.getvalue(), xml_test_out)
895
896 def test_expat_text_file(self):
897 parser = create_parser()

Callers

nothing calls this directly

Calls 8

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

Tested by

no test coverage detected