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

Method test_expat_binary_file_bytes_name

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

Source from the content-addressed store, hash-verified

920 self.assertEqual(result.getvalue(), xml_test_out)
921
922 def test_expat_binary_file_bytes_name(self):
923 fname = os.fsencode(TEST_XMLFILE)
924 parser = create_parser()
925 result = BytesIO()
926 xmlgen = XMLGenerator(result)
927
928 parser.setContentHandler(xmlgen)
929 with open(fname, 'rb') as f:
930 parser.parse(f)
931
932 self.assertEqual(result.getvalue(), xml_test_out)
933
934 def test_expat_binary_file_int_name(self):
935 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