From 5143c7158956fffb621d8046ed58fc59a738730d Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Thu, 2 Aug 2018 01:11:12 +0200 Subject: [PATCH] Change the typeshed test for methods a bit (not yet working, though) --- test/test_plugin/test_stub.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/test_plugin/test_stub.py b/test/test_plugin/test_stub.py index 5b4d337d..d2b9084c 100644 --- a/test/test_plugin/test_stub.py +++ b/test/test_plugin/test_stub.py @@ -1,7 +1,7 @@ import os from jedi.plugins import typeshed -from jedi.evaluate.context import TreeInstance +from jedi.evaluate.context import TreeInstance, BoundMethod from parso.utils import PythonVersionInfo TYPESHED_PYTHON3 = os.path.join(typeshed._TYPESHED_PATH, 'stdlib', '3') @@ -72,4 +72,5 @@ def test_method(Script): code = 'import threading; threading.Thread().getName' def_, = Script(code).goto_definitions() context = def_._name._context - assert isinstance(context, typeshed.ClassStubContext), context + assert isinstance(context, BoundMethod), context + assert isinstance(context.function, typeshed.ClassStubContext), context