Add test _PseudoTreeNameClass.type == 'class'

This commit is contained in:
muffinmad
2020-05-12 23:28:46 +03:00
parent 7cd89cff6e
commit 7ccee7d8fc

View File

@@ -599,3 +599,7 @@ def test_get_type_hint(Script, code, expected, skip_pre_python36):
code = 'from typing import *\n' + code code = 'from typing import *\n' + code
d, = Script(code).goto() d, = Script(code).goto()
assert d.get_type_hint() == expected assert d.get_type_hint() == expected
def test_pseudotreenameclass_type(Script):
assert Script('from typing import Any\n').get_names()[0].type == 'class'