diff --git a/test/test_api/test_full_name.py b/test/test_api/test_full_name.py index 5944ad72..3c287d1a 100644 --- a/test/test_api/test_full_name.py +++ b/test/test_api/test_full_name.py @@ -121,3 +121,10 @@ def test_param_name(Script): name, = Script('class X:\n def foo(bar): bar''').goto() assert name.type == 'param' 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'