forked from VimPlug/jedi
call signature -> signature
This commit is contained in:
@@ -6,7 +6,7 @@ from parso import parse
|
||||
|
||||
def test_form_feed_characters(Script):
|
||||
s = "\f\nclass Test(object):\n pass"
|
||||
Script(s, line=2, column=18).call_signatures()
|
||||
Script(s).find_signatures(line=2, column=18)
|
||||
|
||||
|
||||
def check_p(src):
|
||||
|
||||
@@ -62,13 +62,13 @@ def test_hex_values_in_docstring():
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
'code,call_signature', [
|
||||
'code,signature', [
|
||||
('def my_function(x, typed: Type, z):\n return', 'my_function(x, typed: Type, z)'),
|
||||
('def my_function(x, y, z) -> str:\n return', 'my_function(x, y, z) -> str'),
|
||||
('lambda x, y, z: x + y * z\n', '<lambda>(x, y, z)')
|
||||
])
|
||||
def test_get_call_signature(code, call_signature):
|
||||
def test_get_signature(code, signature):
|
||||
node = parse(code, version='3.5').children[0]
|
||||
if node.type == 'simple_stmt':
|
||||
node = node.children[0]
|
||||
assert parser_utils.get_call_signature(node) == call_signature
|
||||
assert parser_utils.get_signature(node) == signature
|
||||
|
||||
Reference in New Issue
Block a user