summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_xml_etree_c.py
diff options
context:
space:
mode:
authorEli Bendersky <eliben@gmail.com>2012-02-16 17:55:29 (GMT)
committerEli Bendersky <eliben@gmail.com>2012-02-16 17:55:29 (GMT)
commit292f9a891d214fd5098bedb9b4117fc9c36a0fe7 (patch)
tree0910647b755734a8ea8912a699acabfec07e6379 /Lib/test/test_xml_etree_c.py
parent66e6f8e525f9297ad4b8cd61705e761473b9674e (diff)
downloadcpython-292f9a891d214fd5098bedb9b4117fc9c36a0fe7.zip
cpython-292f9a891d214fd5098bedb9b4117fc9c36a0fe7.tar.gz
cpython-292f9a891d214fd5098bedb9b4117fc9c36a0fe7.tar.bz2
make TestAccelerator[Not]Imported for ElementTree more robust
Diffstat (limited to 'Lib/test/test_xml_etree_c.py')
-rw-r--r--Lib/test/test_xml_etree_c.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/Lib/test/test_xml_etree_c.py b/Lib/test/test_xml_etree_c.py
index d821b81..dbe1c3a 100644
--- a/Lib/test/test_xml_etree_c.py
+++ b/Lib/test/test_xml_etree_c.py
@@ -46,15 +46,11 @@ class MiscTests(unittest.TestCase):
finally:
data = None
+@unittest.skipUnless(cET, 'requires _elementtree')
class TestAcceleratorImported(unittest.TestCase):
# Test that the C accelerator was imported, as expected
def test_correct_import_cET(self):
- # In the C accelerator, Element is just a factory function, not an
- # actual class. In the Python version it's a class.
- self.assertNotIsInstance(cET.Element, type)
-
- #def test_correct_import_cET_alias(self):
- #self.assertNotIsInstance(cET_alias.Element, type)
+ self.assertEqual(cET.Element.__module__, '_elementtree')
def test_main():