mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 22:14:27 +08:00
Working with CompiledObject in stubs is now possible
This commit is contained in:
@@ -79,3 +79,10 @@ def test_method(Script):
|
||||
context = def_._name._context
|
||||
assert isinstance(context, CompiledInstance)
|
||||
assert context.class_context.py__name__() == 'str'
|
||||
|
||||
|
||||
def test_math(Script):
|
||||
def_, = Script('import math; math.acos()').goto_definitions()
|
||||
assert def_.name == 'float'
|
||||
context = def_._name._context
|
||||
assert context
|
||||
|
||||
Reference in New Issue
Block a user