summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2006-07-29 18:19:19 (GMT)
committerFred Drake <fdrake@acm.org>2006-07-29 18:19:19 (GMT)
commit9297e16907098cfecf30b58961572dcc478b837e (patch)
treec60faa3bb7916b43f7c6e9d93283806f45c3152a /Lib
parent956597f4ef4ef4c65b0a5a7e488757d865832a0e (diff)
downloadcpython-9297e16907098cfecf30b58961572dcc478b837e.zip
cpython-9297e16907098cfecf30b58961572dcc478b837e.tar.gz
cpython-9297e16907098cfecf30b58961572dcc478b837e.tar.bz2
restore test un-intentionally removed in the xmlcore purge (revision 50941)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_xml_etree.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/Lib/test/test_xml_etree.py b/Lib/test/test_xml_etree.py
index 1e8aa2d..78adb42 100644
--- a/Lib/test/test_xml_etree.py
+++ b/Lib/test/test_xml_etree.py
@@ -199,6 +199,21 @@ def parseliteral():
'body'
"""
+
+def check_encoding(ET, encoding):
+ """
+ >>> from xml.etree import ElementTree as ET
+
+ >>> check_encoding(ET, "ascii")
+ >>> check_encoding(ET, "us-ascii")
+ >>> check_encoding(ET, "iso-8859-1")
+ >>> check_encoding(ET, "iso-8859-15")
+ >>> check_encoding(ET, "cp437")
+ >>> check_encoding(ET, "mac-roman")
+ """
+ ET.XML("<?xml version='1.0' encoding='%s'?><xml />" % encoding)
+
+
#
# xinclude tests (samples from appendix C of the xinclude specification)