diff options
author | Eli Bendersky <eliben@gmail.com> | 2012-02-16 19:55:29 +0200 |
---|---|---|
committer | Eli Bendersky <eliben@gmail.com> | 2012-02-16 19:55:29 +0200 |
commit | e2245e3ecf01fbd7c5131cd1088aa5799853494e (patch) | |
tree | e0197361a27ccd781310abebbfb5e91eb1dd92f7 /Lib/test/test_xml_etree_c.py | |
parent | 14ddc4a724317154daff1dc761414bc880a5e8cc (diff) | |
download | cpython-e2245e3ecf01fbd7c5131cd1088aa5799853494e.tar.gz |
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.py | 8 |
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 d821b81b7a..dbe1c3aff1 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(): |