]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-40086: Update/fix test_etree test case in test_typing (GH-19189)
authorFurkan Önder <furkantahaonder@gmail.com>
Sat, 28 Mar 2020 12:32:36 +0000 (15:32 +0300)
committerGitHub <noreply@github.com>
Sat, 28 Mar 2020 12:32:36 +0000 (12:32 +0000)
Lib/test/test_typing.py

index 6b0a905048cea39663b55e7d67a43bbb1aaf10c3..8d6262b9c1b02bc3f62b536e5bcf295d091dc752 100644 (file)
@@ -361,10 +361,8 @@ class UnionTests(BaseTestCase):
     def test_etree(self):
         # See https://github.com/python/typing/issues/229
         # (Only relevant for Python 2.)
-        try:
-            from xml.etree.cElementTree import Element
-        except ImportError:
-            raise SkipTest("cElementTree not found")
+        from xml.etree.ElementTree import Element
+
         Union[Element, str]  # Shouldn't crash
 
         def Elem(*args):