88
99cET = import_fresh_module ('xml.etree.ElementTree' ,
1010 fresh = ['_elementtree' ])
11- cET_alias = import_fresh_module ('xml.etree.cElementTree' ,
12- fresh = ['_elementtree' , 'xml.etree' ],
13- deprecated = True )
1411
1512
1613@unittest .skipUnless (cET , 'requires _elementtree' )
@@ -155,14 +152,6 @@ def test_xmlpullparser_leaks(self):
155152 support .gc_collect ()
156153
157154
158- @unittest .skipUnless (cET , 'requires _elementtree' )
159- class TestAliasWorking (unittest .TestCase ):
160- # Test that the cET alias module is alive
161- def test_alias_working (self ):
162- e = cET_alias .Element ('foo' )
163- self .assertEqual (e .tag , 'foo' )
164-
165-
166155@unittest .skipUnless (cET , 'requires _elementtree' )
167156@support .cpython_only
168157class TestAcceleratorImported (unittest .TestCase ):
@@ -171,9 +160,6 @@ def test_correct_import_cET(self):
171160 # SubElement is a function so it retains _elementtree as its module.
172161 self .assertEqual (cET .SubElement .__module__ , '_elementtree' )
173162
174- def test_correct_import_cET_alias (self ):
175- self .assertEqual (cET_alias .SubElement .__module__ , '_elementtree' )
176-
177163 def test_parser_comes_from_C (self ):
178164 # The type of methods defined in Python code is types.FunctionType,
179165 # while the type of methods defined inside _elementtree is
@@ -213,7 +199,6 @@ def test_main():
213199 # Run the tests specific to the C implementation
214200 support .run_unittest (
215201 MiscTests ,
216- TestAliasWorking ,
217202 TestAcceleratorImported ,
218203 SizeofTest ,
219204 )
0 commit comments