Skip to content

Commit

Permalink
bpo-36543: Remove the xml.etree.cElementTree module. (GH-19108)
Browse files Browse the repository at this point in the history
  • Loading branch information
serhiy-storchaka committed Mar 22, 2020
1 parent b146568 commit b33e525
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
15 changes: 0 additions & 15 deletions Lib/test/test_xml_etree_c.py
Expand Up @@ -8,9 +8,6 @@

cET = import_fresh_module('xml.etree.ElementTree',
fresh=['_elementtree'])
cET_alias = import_fresh_module('xml.etree.cElementTree',
fresh=['_elementtree', 'xml.etree'],
deprecated=True)


@unittest.skipUnless(cET, 'requires _elementtree')
Expand Down Expand Up @@ -155,14 +152,6 @@ def test_xmlpullparser_leaks(self):
support.gc_collect()


@unittest.skipUnless(cET, 'requires _elementtree')
class TestAliasWorking(unittest.TestCase):
# Test that the cET alias module is alive
def test_alias_working(self):
e = cET_alias.Element('foo')
self.assertEqual(e.tag, 'foo')


@unittest.skipUnless(cET, 'requires _elementtree')
@support.cpython_only
class TestAcceleratorImported(unittest.TestCase):
Expand All @@ -171,9 +160,6 @@ def test_correct_import_cET(self):
# SubElement is a function so it retains _elementtree as its module.
self.assertEqual(cET.SubElement.__module__, '_elementtree')

def test_correct_import_cET_alias(self):
self.assertEqual(cET_alias.SubElement.__module__, '_elementtree')

def test_parser_comes_from_C(self):
# The type of methods defined in Python code is types.FunctionType,
# while the type of methods defined inside _elementtree is
Expand Down Expand Up @@ -213,7 +199,6 @@ def test_main():
# Run the tests specific to the C implementation
support.run_unittest(
MiscTests,
TestAliasWorking,
TestAcceleratorImported,
SizeofTest,
)
Expand Down
3 changes: 0 additions & 3 deletions Lib/xml/etree/cElementTree.py

This file was deleted.

0 comments on commit b33e525

Please sign in to comment.