diff options
author | Alexander Belopolsky <alexander.belopolsky@gmail.com> | 2010-12-08 23:31:48 (GMT) |
---|---|---|
committer | Alexander Belopolsky <alexander.belopolsky@gmail.com> | 2010-12-08 23:31:48 (GMT) |
commit | e239d23e8cc66605f548585ad4489a8f12fc070d (patch) | |
tree | e165422c11006a4f3595742dd40a7a2095ef59ce /Lib/test/test_xml_etree_c.py | |
parent | 1b2bd3b348d7bb861ae8c92853e5058766ebff80 (diff) | |
download | cpython-e239d23e8cc66605f548585ad4489a8f12fc070d.zip cpython-e239d23e8cc66605f548585ad4489a8f12fc070d.tar.gz cpython-e239d23e8cc66605f548585ad4489a8f12fc070d.tar.bz2 |
Issue #6697: Fixed instances of _PyUnicode_AsString() result not checked for NULL
Diffstat (limited to 'Lib/test/test_xml_etree_c.py')
-rw-r--r-- | Lib/test/test_xml_etree_c.py | 18 |
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' """ |