Get doctest completions working, fixes #860

This commit is contained in:
Dave Halter
2020-01-01 00:24:58 +01:00
parent 8914bbbcc3
commit 50c5eb5786
5 changed files with 99 additions and 10 deletions

View File

@@ -252,3 +252,46 @@ def import_issues(foo):
"""
#? datetime.datetime()
foo
# -----------------
# Doctest completions
# -----------------
def doctest_with_gt():
"""
x
>>> somewhere_in_docstring = 3
#? ['import_issues']
>>> import_issu
#? ['somewhere_in_docstring']
>>> somewhere_
blabla
>>> haha = 3
#? ['haha']
>>> hah
#? ['doctest_with_space']
>>> doctest_with_sp
"""
def doctest_with_space():
"""
x
#? ['import_issues']
import_issu
"""
def doctest_without_ending():
"""
#? []
import_issu
ha
no_ending = False
#? ['import_issues']
import_issu
#? ['no_ending']
no_endin