forked from VimPlug/jedi
Some more tests
This commit is contained in:
@@ -100,7 +100,11 @@ class TreeSignature(AbstractSignature):
|
|||||||
yield param_name
|
yield param_name
|
||||||
|
|
||||||
for param_name in kwarg_params:
|
for param_name in kwarg_params:
|
||||||
for param_names in _iter_nodes_for_param(param_name, star_count=2):
|
itered = list(_iter_nodes_for_param(param_name, star_count=2))
|
||||||
|
if not itered:
|
||||||
|
yield param_name
|
||||||
|
|
||||||
|
for param_names in itered:
|
||||||
for p in param_names:
|
for p in param_names:
|
||||||
if p.string_name not in used_names or p.get_kind() == Parameter.VAR_KEYWORD:
|
if p.string_name not in used_names or p.get_kind() == Parameter.VAR_KEYWORD:
|
||||||
used_names.add(p.string_name)
|
used_names.add(p.string_name)
|
||||||
|
|||||||
@@ -109,6 +109,12 @@ def test_tree_signature(Script, environment, code, expected):
|
|||||||
'x, /, *, y'),
|
'x, /, *, y'),
|
||||||
('combined_redirect(combined_redirect(simple4, simple2), combined_redirect(simple5, kw))',
|
('combined_redirect(combined_redirect(simple4, simple2), combined_redirect(simple5, kw))',
|
||||||
'a, b, x: int, /, *, a, b, c, **kwargs'),
|
'a, b, x: int, /, *, a, b, c, **kwargs'),
|
||||||
|
('combined_redirect(combined_redirect(a, kw), combined_redirect(kw, simple5))',
|
||||||
|
'a, b, /, *args, y'),
|
||||||
|
|
||||||
|
('no_redirect(kw)', '*args, **kwargs'),
|
||||||
|
('no_redirect(akw)', '*args, **kwargs'),
|
||||||
|
('no_redirect(simple)', '*args, **kwargs'),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
def test_nested_signatures(Script, environment, combination, expected):
|
def test_nested_signatures(Script, environment, combination, expected):
|
||||||
|
|||||||
Reference in New Issue
Block a user