mirror of
https://github.com/davidhalter/jedi.git
synced 2026-10-15 04:11:06 +08:00
Working with CompiledObject in stubs is now possible
This commit is contained in:
1 parent
1ade520ac0
commit
facbf61133
2 files changed
+13
No files matched your search
@@ -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