summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_xml_etree_c.py
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2012-02-16 22:17:31 (GMT)
committerFlorent Xicluna <florent.xicluna@gmail.com>2012-02-16 22:17:31 (GMT)
commite59a306081d8f34814b91dc9e911beac7271c452 (patch)
treeeeb596d8e49cc256a5fe3b4a444e3435cde94db3 /Lib/test/test_xml_etree_c.py
parent17f1be63681c921a82f2dd9dd44e0305e46b4733 (diff)
downloadcpython-e59a306081d8f34814b91dc9e911beac7271c452.zip
cpython-e59a306081d8f34814b91dc9e911beac7271c452.tar.gz
cpython-e59a306081d8f34814b91dc9e911beac7271c452.tar.bz2
The C accelerator was not always imported for cElementTree's tests. (there's still an issue with --huntrleaks switch)
Diffstat (limited to 'Lib/test/test_xml_etree_c.py')
-rw-r--r--Lib/test/test_xml_etree_c.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_xml_etree_c.py b/Lib/test/test_xml_etree_c.py
index dbe1c3a..a73d0c4 100644
--- a/Lib/test/test_xml_etree_c.py
+++ b/Lib/test/test_xml_etree_c.py
@@ -5,7 +5,7 @@ from test.support import import_fresh_module
import unittest
cET = import_fresh_module('xml.etree.ElementTree', fresh=['_elementtree'])
-cET_alias = import_fresh_module('xml.etree.cElementTree', fresh=['_elementtree'])
+cET_alias = import_fresh_module('xml.etree.cElementTree', fresh=['_elementtree', 'xml.etree'])
# cElementTree specific tests
@@ -52,6 +52,9 @@ class TestAcceleratorImported(unittest.TestCase):
def test_correct_import_cET(self):
self.assertEqual(cET.Element.__module__, '_elementtree')
+ def test_correct_import_cET_alias(self):
+ self.assertEqual(cET_alias.Element.__module__, '_elementtree')
+
def test_main():
from test import test_xml_etree, test_xml_etree_c