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

Method test_expat_text_file

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

Source from the content-addressed store, hash-verified

894 self.assertEqual(result.getvalue(), xml_test_out)
895
896 def test_expat_text_file(self):
897 parser = create_parser()
898 result = BytesIO()
899 xmlgen = XMLGenerator(result)
900
901 parser.setContentHandler(xmlgen)
902 with open(TEST_XMLFILE, 'rt', encoding='iso-8859-1') as f:
903 parser.parse(f)
904
905 self.assertEqual(result.getvalue(), xml_test_out)
906
907 @requires_nonascii_filenames
908 def test_expat_binary_file_nonascii(self):

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