diff options
author | Marc-André Lemburg <mal@egenix.com> | 2011-02-25 15:42:01 (GMT) |
---|---|---|
committer | Marc-André Lemburg <mal@egenix.com> | 2011-02-25 15:42:01 (GMT) |
commit | 8f36af7a4c9409a673412e4bdfbad76d700abc3a (patch) | |
tree | 1b61599a07604a96539e98098b055c577cd7e6a8 /Lib/test/test_xml_etree.py | |
parent | a391b11320f729f6eec6c772c00b3e62c2746eaf (diff) | |
download | cpython-8f36af7a4c9409a673412e4bdfbad76d700abc3a.zip cpython-8f36af7a4c9409a673412e4bdfbad76d700abc3a.tar.gz cpython-8f36af7a4c9409a673412e4bdfbad76d700abc3a.tar.bz2 |
Normalize the encoding names for Latin-1 and UTF-8 to
'latin-1' and 'utf-8'.
These are optimized in the Python Unicode implementation
to result in more direct processing, bypassing the codec
registry.
Also see issue11303.
Diffstat (limited to 'Lib/test/test_xml_etree.py')
-rw-r--r-- | Lib/test/test_xml_etree.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_xml_etree.py b/Lib/test/test_xml_etree.py index 22fafa9..40c2291 100644 --- a/Lib/test/test_xml_etree.py +++ b/Lib/test/test_xml_etree.py @@ -22,7 +22,7 @@ from xml.etree import ElementTree as ET SIMPLE_XMLFILE = findfile("simple.xml", subdir="xmltestdata") try: - SIMPLE_XMLFILE.encode("utf8") + SIMPLE_XMLFILE.encode("utf-8") except UnicodeEncodeError: raise unittest.SkipTest("filename is not encodable to utf8") SIMPLE_NS_XMLFILE = findfile("simple-ns.xml", subdir="xmltestdata") @@ -1255,8 +1255,8 @@ def processinginstruction(): >>> ET.tostring(ET.PI('test', '<testing&>')) b'<?test <testing&>?>' - >>> ET.tostring(ET.PI('test', '<testing&>\xe3'), 'latin1') - b"<?xml version='1.0' encoding='latin1'?>\\n<?test <testing&>\\xe3?>" + >>> ET.tostring(ET.PI('test', '<testing&>\xe3'), 'latin-1') + b"<?xml version='1.0' encoding='latin-1'?>\\n<?test <testing&>\\xe3?>" """ # |