summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_xml_etree.py
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2012-02-16 22:28:35 (GMT)
committerFlorent Xicluna <florent.xicluna@gmail.com>2012-02-16 22:28:35 (GMT)
commit1639505c383a1c8b46ff6f2a5b9071f26ad43ece (patch)
treeed53c373225afdf1cdbf4c2874c97445f8704759 /Lib/test/test_xml_etree.py
parente59a306081d8f34814b91dc9e911beac7271c452 (diff)
downloadcpython-1639505c383a1c8b46ff6f2a5b9071f26ad43ece.zip
cpython-1639505c383a1c8b46ff6f2a5b9071f26ad43ece.tar.gz
cpython-1639505c383a1c8b46ff6f2a5b9071f26ad43ece.tar.bz2
fix the _namespace_map cleanup for cElementTree tests.
Diffstat (limited to 'Lib/test/test_xml_etree.py')
-rw-r--r--Lib/test/test_xml_etree.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/Lib/test/test_xml_etree.py b/Lib/test/test_xml_etree.py
index 8713de5..58fdcd4 100644
--- a/Lib/test/test_xml_etree.py
+++ b/Lib/test/test_xml_etree.py
@@ -1881,12 +1881,7 @@ class CleanContext(object):
def __enter__(self):
from xml.etree import ElementPath
- if hasattr(ET, '_namespace_map'):
- self._nsmap = ET._namespace_map
- else:
- # when testing the cElementTree alias
- from xml.etree.ElementTree import _namespace_map
- self._nsmap = _namespace_map
+ self._nsmap = ET.register_namespace._namespace_map
# Copy the default namespace mapping
self._nsmap_copy = self._nsmap.copy()
# Copy the path cache (should be empty)