We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b753d31 commit cbd6dbbCopy full SHA for cbd6dbb
Lib/test/test_xml_etree.py
@@ -468,11 +468,8 @@ def test_parse_encoding_warn(self):
468
with self.assertWarns(RuntimeWarning) as cm:
469
with open(SIMPLE_XMLFILE, 'r', encoding='ISO-8859-1') as fp:
470
ET.parse(fp)
471
- self.assertIn(
472
- "For file objects containing XML data "
473
- "with non-ASCII and non-UTF-8 encoding (for example. ISO 8859-1), "
474
- "the file must have been opened in binary mode.",
475
- str(cm.warnings[0].message))
+ self.assertIn("ISO-8859-1 encoding should be read using 'rb' mode.",
+ str(cm.warnings[0].message))
476
477
def test_parsefile(self):
478
# Test parsing from file.
0 commit comments