Skip to content

Commit cbd6dbb

Browse files
authored
Change warn info
1 parent b753d31 commit cbd6dbb

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Lib/test/test_xml_etree.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -468,11 +468,8 @@ def test_parse_encoding_warn(self):
468468
with self.assertWarns(RuntimeWarning) as cm:
469469
with open(SIMPLE_XMLFILE, 'r', encoding='ISO-8859-1') as fp:
470470
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))
471+
self.assertIn("ISO-8859-1 encoding should be read using 'rb' mode.",
472+
str(cm.warnings[0].message))
476473

477474
def test_parsefile(self):
478475
# Test parsing from file.

0 commit comments

Comments
 (0)