bpo-40086: Update/fix test_etree test case in test_typing (GH-19189)
This commit is contained in:
parent
6467134307
commit
34b0598295
|
@ -361,10 +361,8 @@ class UnionTests(BaseTestCase):
|
||||||
def test_etree(self):
|
def test_etree(self):
|
||||||
# See https://github.com/python/typing/issues/229
|
# See https://github.com/python/typing/issues/229
|
||||||
# (Only relevant for Python 2.)
|
# (Only relevant for Python 2.)
|
||||||
try:
|
from xml.etree.ElementTree import Element
|
||||||
from xml.etree.cElementTree import Element
|
|
||||||
except ImportError:
|
|
||||||
raise SkipTest("cElementTree not found")
|
|
||||||
Union[Element, str] # Shouldn't crash
|
Union[Element, str] # Shouldn't crash
|
||||||
|
|
||||||
def Elem(*args):
|
def Elem(*args):
|
||||||
|
|
Loading…
Reference in New Issue