forked from VimPlug/jedi
Move execute_evaluated to HelperContextMixin
This commit is contained in:
@@ -8,14 +8,13 @@ import pytest
|
||||
|
||||
from jedi.evaluate import compiled
|
||||
from jedi.evaluate.compiled.access import DirectObjectAccess
|
||||
from jedi.evaluate.helpers import execute_evaluated
|
||||
from jedi.evaluate.gradual.conversion import _stub_to_python_context_set
|
||||
|
||||
|
||||
def test_simple(evaluator, environment):
|
||||
obj = compiled.create_simple_object(evaluator, u'_str_')
|
||||
upper, = obj.py__getattribute__(u'upper')
|
||||
objs = list(execute_evaluated(upper))
|
||||
objs = list(upper.execute_evaluated())
|
||||
assert len(objs) == 1
|
||||
if environment.version_info.major == 2:
|
||||
expected = 'unicode'
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
from textwrap import dedent
|
||||
|
||||
from jedi.evaluate.helpers import execute_evaluated
|
||||
|
||||
|
||||
def get_definition_and_evaluator(Script, source):
|
||||
first, = Script(dedent(source)).goto_definitions()
|
||||
@@ -22,8 +20,8 @@ def test_function_execution(Script):
|
||||
# Now just use the internals of the result (easiest way to get a fully
|
||||
# usable function).
|
||||
# Should return the same result both times.
|
||||
assert len(execute_evaluated(func)) == 1
|
||||
assert len(execute_evaluated(func)) == 1
|
||||
assert len(func.execute_evaluated()) == 1
|
||||
assert len(func.execute_evaluated()) == 1
|
||||
|
||||
|
||||
def test_class_mro(Script):
|
||||
|
||||
Reference in New Issue
Block a user