bpo-40086: Update/fix test_etree test case in test_typing (GH-19189)

This commit is contained in:
Furkan Önder 2020-03-28 15:32:36 +03:00 committed by GitHub
parent 6467134307
commit 34b0598295
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View 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):