mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 22:14:27 +08:00
Make partial use the __doc__ of its function, fixes #1621
This commit is contained in:
@@ -422,6 +422,19 @@ def test_decorator(Script):
|
||||
assert d.docstring(raw=True) == 'Nice docstring'
|
||||
|
||||
|
||||
def test_partial(Script):
|
||||
code = dedent('''
|
||||
def foo():
|
||||
'x y z'
|
||||
from functools import partial
|
||||
x = partial(foo)
|
||||
x''')
|
||||
|
||||
p1, p2 = Script(code).infer()
|
||||
assert p1.docstring(raw=True) == 'x y z'
|
||||
assert p2.docstring(raw=True) == 'x y z'
|
||||
|
||||
|
||||
def test_basic_str_init_signature(Script, disable_typeshed):
|
||||
# See GH #1414 and GH #1426
|
||||
code = dedent('''
|
||||
|
||||
Reference in New Issue
Block a user