8
8
9
9
cET = import_fresh_module ('xml.etree.ElementTree' ,
10
10
fresh = ['_elementtree' ])
11
- cET_alias = import_fresh_module ('xml.etree.cElementTree' ,
12
- fresh = ['_elementtree' , 'xml.etree' ],
13
- deprecated = True )
14
11
15
12
16
13
@unittest .skipUnless (cET , 'requires _elementtree' )
@@ -155,14 +152,6 @@ def test_xmlpullparser_leaks(self):
155
152
support .gc_collect ()
156
153
157
154
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
-
166
155
@unittest .skipUnless (cET , 'requires _elementtree' )
167
156
@support .cpython_only
168
157
class TestAcceleratorImported (unittest .TestCase ):
@@ -171,9 +160,6 @@ def test_correct_import_cET(self):
171
160
# SubElement is a function so it retains _elementtree as its module.
172
161
self .assertEqual (cET .SubElement .__module__ , '_elementtree' )
173
162
174
- def test_correct_import_cET_alias (self ):
175
- self .assertEqual (cET_alias .SubElement .__module__ , '_elementtree' )
176
-
177
163
def test_parser_comes_from_C (self ):
178
164
# The type of methods defined in Python code is types.FunctionType,
179
165
# while the type of methods defined inside _elementtree is
@@ -213,7 +199,6 @@ def test_main():
213
199
# Run the tests specific to the C implementation
214
200
support .run_unittest (
215
201
MiscTests ,
216
- TestAliasWorking ,
217
202
TestAcceleratorImported ,
218
203
SizeofTest ,
219
204
)
0 commit comments