forked from VimPlug/jedi
Change some TypeVar base classes
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
import os
|
||||
|
||||
import pytest
|
||||
|
||||
from jedi.plugins import typeshed
|
||||
from jedi.evaluate.context import TreeInstance, BoundMethod, CompiledInstance
|
||||
from parso.utils import PythonVersionInfo
|
||||
@@ -10,9 +8,6 @@ from jedi.evaluate.filters import TreeNameDefinition
|
||||
TYPESHED_PYTHON3 = os.path.join(typeshed._TYPESHED_PATH, 'stdlib', '3')
|
||||
|
||||
|
||||
pytestmark = pytest.mark.skip(reason="For now ignore stub tests")
|
||||
|
||||
|
||||
def test_get_typeshed_directories():
|
||||
def get_dirs(version_info):
|
||||
return {
|
||||
@@ -125,3 +120,9 @@ def test_math(Script):
|
||||
assert def_.name == 'float'
|
||||
context = def_._name._context
|
||||
assert context
|
||||
|
||||
|
||||
def test_type_var(Script):
|
||||
def_, = Script('import typing; T = typing.TypeVar("T1")').goto_definitions()
|
||||
assert def_.name == 'TypeVar'
|
||||
assert def_.description == 'TypeVar = object()'
|
||||
|
||||
Reference in New Issue
Block a user