From: Furkan Önder Date: Sat, 28 Mar 2020 12:32:36 +0000 (+0300) Subject: bpo-40086: Update/fix test_etree test case in test_typing (GH-19189) X-Git-Tag: v3.9.0a6~254 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=34b0598295284e3ff6cedf5c05e159ce1fa54d60;p=thirdparty%2FPython%2Fcpython.git bpo-40086: Update/fix test_etree test case in test_typing (GH-19189) --- diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py index 6b0a905048ce..8d6262b9c1b0 100644 --- a/Lib/test/test_typing.py +++ b/Lib/test/test_typing.py @@ -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):