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

Method test_expat_text_file

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

Source from the content-addressed store, hash-verified

905
906 @unittest.expectedFailure # TODO: RUSTPYTHON; AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
907 def test_expat_text_file(self):
908 parser = create_parser()
909 result = BytesIO()
910 xmlgen = XMLGenerator(result)
911
912 parser.setContentHandler(xmlgen)
913 with open(TEST_XMLFILE, 'rt', encoding='iso-8859-1') as f:
914 parser.parse(f)
915
916 self.assertEqual(result.getvalue(), xml_test_out)
917
918 @unittest.expectedFailure # TODO: RUSTPYTHON; AttributeError: 'xmlparser' object has no attribute 'SetParamEntityParsing'
919 @requires_nonascii_filenames

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