Working with CompiledObject in stubs is now possible

This commit is contained in:
Dave Halter
2018-08-08 18:57:05 +02:00
parent 1ade520ac0
commit facbf61133
2 changed files with 13 additions and 0 deletions

View File

@@ -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