MCPcopy Create free account
hub / github.com/python/cpython / test_expat_inpsource_sysid_nonascii

Method test_expat_inpsource_sysid_nonascii

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

Source from the content-addressed store, hash-verified

1142
1143 @requires_nonascii_filenames
1144 def test_expat_inpsource_sysid_nonascii(self):
1145 fname = os_helper.TESTFN_UNICODE
1146 shutil.copyfile(TEST_XMLFILE, fname)
1147 self.addCleanup(os_helper.unlink, fname)
1148
1149 parser = create_parser()
1150 result = BytesIO()
1151 xmlgen = XMLGenerator(result)
1152
1153 parser.setContentHandler(xmlgen)
1154 parser.parse(InputSource(fname))
1155
1156 self.assertEqual(result.getvalue(), xml_test_out)
1157
1158 def test_expat_inpsource_byte_stream(self):
1159 parser = create_parser()

Callers

nothing calls this directly

Calls 10

getvalueMethod · 0.95
create_parserFunction · 0.90
BytesIOClass · 0.90
XMLGeneratorClass · 0.90
InputSourceClass · 0.90
copyfileMethod · 0.80
addCleanupMethod · 0.80
setContentHandlerMethod · 0.45
parseMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected