mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
The C accelerator was not always imported for cElementTree's tests. (there's still an issue with --huntrleaks switch)
This commit is contained in:
parent
17f1be6368
commit
e59a306081
2 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue