From: Fred Drake Date: Sat, 29 Jul 2006 18:19:19 +0000 (+0000) Subject: restore test un-intentionally removed in the xmlcore purge (revision 50941) X-Git-Tag: v2.5b3~77 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9297e16907098cfecf30b58961572dcc478b837e;p=thirdparty%2FPython%2Fcpython.git restore test un-intentionally removed in the xmlcore purge (revision 50941) --- diff --git a/Lib/test/test_xml_etree.py b/Lib/test/test_xml_etree.py index 1e8aa2dbd69f..78adb42e1914 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("" % encoding) + + # # xinclude tests (samples from appendix C of the xinclude specification)