[Python-checkins] r50943 - python/trunk/Lib/test/test_xml_etree.py
fred.drake
python-checkins at python.org
Sat Jul 29 20:19:20 CEST 2006
Author: fred.drake
Date: Sat Jul 29 20:19:19 2006
New Revision: 50943
Modified:
python/trunk/Lib/test/test_xml_etree.py
Log:
restore test un-intentionally removed in the xmlcore purge (revision 50941)
Modified: python/trunk/Lib/test/test_xml_etree.py
==============================================================================
--- python/trunk/Lib/test/test_xml_etree.py (original)
+++ python/trunk/Lib/test/test_xml_etree.py Sat Jul 29 20:19:19 2006
@@ -199,6 +199,21 @@
'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)
More information about the Python-checkins
mailing list