mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 14:34:31 +08:00
test_evaluate -> test_inference
This commit is contained in:
16
test/test_inference/test_helpers.py
Normal file
16
test/test_inference/test_helpers.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from textwrap import dedent
|
||||
|
||||
from jedi import names
|
||||
from jedi.evaluate import helpers
|
||||
|
||||
|
||||
def test_call_of_leaf_in_brackets(environment):
|
||||
s = dedent("""
|
||||
x = 1
|
||||
type(x)
|
||||
""")
|
||||
last_x = names(s, references=True, definitions=False, environment=environment)[-1]
|
||||
name = last_x._name.tree_name
|
||||
|
||||
call = helpers.call_of_leaf(name)
|
||||
assert call == name
|
||||
Reference in New Issue
Block a user