Some more clarifications around docstrings, see #860

This commit is contained in:
Dave Halter
2020-01-01 01:45:58 +01:00
parent 50c5eb5786
commit cea7a12908
2 changed files with 32 additions and 7 deletions

View File

@@ -424,3 +424,18 @@ def test_basic_str_init_signature(Script, disable_typeshed):
Foo(''')
c, = Script(code).find_signatures()
assert c.name == 'Foo'
def test_doctest_result_completion(Script):
code = '''\
"""
comment
>>> something = 3
somethi
"""
something_else = 8
'''
c1, c2 = Script(code).complete(line=5)
assert c1.complete == 'ng'
assert c2.complete == 'ng_else'