summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_xml_etree_c.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_xml_etree_c.py')
-rw-r--r--Lib/test/test_xml_etree_c.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/Lib/test/test_xml_etree_c.py b/Lib/test/test_xml_etree_c.py
index ee270f9..5c0bf6c 100644
--- a/Lib/test/test_xml_etree_c.py
+++ b/Lib/test/test_xml_etree_c.py
@@ -8,10 +8,26 @@ cET = support.import_module('xml.etree.cElementTree')
# cElementTree specific tests
def sanity():
- """
+ r"""
Import sanity.
>>> from xml.etree import cElementTree
+
+ Issue #6697.
+
+ >>> e = cElementTree.Element('a')
+ >>> getattr(e, '\uD800') # doctest: +ELLIPSIS
+ Traceback (most recent call last):
+ ...
+ UnicodeEncodeError: ...
+
+ >>> p = cElementTree.XMLParser()
+ >>> p.version.split()[0]
+ 'Expat'
+ >>> getattr(p, '\uD800')
+ Traceback (most recent call last):
+ ...
+ AttributeError: 'XMLParser' object has no attribute '\ud800'
"""