Fix a Python 2 test
This commit is contained in:
1 parent
a2764283ba
commit
28c1ba6c1c
1 file changed
+2
-5
@@ -136,13 +136,10 @@ def test_math(Script):
|
||||
assert value
|
||||
|
||||
|
||||
def test_type_var(Script, environment):
|
||||
def test_type_var(Script, environment, skip_python2):
|
||||
def_, = Script('import typing; T = typing.TypeVar("T1")').infer()
|
||||
assert def_.name == 'TypeVar'
|
||||
if environment.version_info.major == 2:
|
||||
assert def_.description == 'TypeVar = object()'
|
||||
else:
|
||||
assert def_.description == 'class TypeVar'
|
||||
assert def_.description == 'class TypeVar'
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
|
||||
Reference in new issue
Block a user