MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_expat_binary_file_nonascii

Method test_expat_binary_file_nonascii

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

Source from the content-addressed store, hash-verified

918 @unittest.expectedFailure # TODO: RUSTPYTHON; AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
919 @requires_nonascii_filenames
920 def test_expat_binary_file_nonascii(self):
921 fname = os_helper.TESTFN_UNICODE
922 shutil.copyfile(TEST_XMLFILE, fname)
923 self.addCleanup(os_helper.unlink, fname)
924
925 parser = create_parser()
926 result = BytesIO()
927 xmlgen = XMLGenerator(result)
928
929 parser.setContentHandler(xmlgen)
930 parser.parse(open(fname, 'rb'))
931
932 self.assertEqual(result.getvalue(), xml_test_out)
933
934 @unittest.expectedFailure # TODO: RUSTPYTHON; AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
935 def test_expat_binary_file_bytes_name(self):

Callers

nothing calls this directly

Calls 10

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

Tested by

no test coverage detected