mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 22:44:27 +08:00
Test that full_name in funcs work
This commit is contained in:
@@ -121,3 +121,10 @@ def test_param_name(Script):
|
|||||||
name, = Script('class X:\n def foo(bar): bar''').goto()
|
name, = Script('class X:\n def foo(bar): bar''').goto()
|
||||||
assert name.type == 'param'
|
assert name.type == 'param'
|
||||||
assert name.full_name is None
|
assert name.full_name is None
|
||||||
|
|
||||||
|
|
||||||
|
def test_variable_in_func(Script):
|
||||||
|
names = Script('def f(): x = 3').get_names(all_scopes=True)
|
||||||
|
x = names[-1]
|
||||||
|
assert x.name == 'x'
|
||||||
|
assert x.full_name == '__main__.f.x'
|
||||||
|
|||||||
Reference in New Issue
Block a user