File: test_helpers.py

package info (click to toggle)
python-jedi 0.10.0~git1%2Bf05c071-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,064 kB
  • ctags: 3,014
  • sloc: python: 16,997; makefile: 149; ansic: 13
file content (16 lines) | stat: -rw-r--r-- 324 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from textwrap import dedent

from jedi import names
from jedi.evaluate import helpers


def test_call_of_leaf_in_brackets():
    s = dedent("""
    x = 1
    type(x)
    """)
    last_x = names(s, references=True, definitions=False)[-1]
    name = last_x._name

    call = helpers.call_of_leaf(name)
    assert call == name