mirror of
https://github.com/davidhalter/jedi.git
synced 2026-02-03 23:12:44 +08:00
Improve docstring formatting
This commit is contained in:
@@ -142,6 +142,16 @@ def test_docstring_keyword(Script):
|
||||
assert 'assert' in completions[0].docstring()
|
||||
|
||||
|
||||
def test_docstring_params_formatting(Script):
|
||||
defs = Script("""
|
||||
def func(param1,
|
||||
param2,
|
||||
param3):
|
||||
pass
|
||||
func""").goto_definitions()
|
||||
assert defs[0].docstring() == 'func(param1, param2, param3)'
|
||||
|
||||
|
||||
# ---- Numpy Style Tests ---
|
||||
|
||||
@pytest.mark.skipif(numpydoc_unavailable,
|
||||
|
||||
@@ -85,4 +85,4 @@ def test_get_call_signature(code, call_signature):
|
||||
node = node.children[0]
|
||||
assert parser_utils.get_call_signature(node) == call_signature
|
||||
|
||||
assert parser_utils.get_doc_with_call_signature(node) == (call_signature + '\n\n')
|
||||
assert parser_utils.get_doc_with_call_signature(node) == call_signature
|
||||
|
||||
Reference in New Issue
Block a user