From 5b4ee16317b5dfd6e02acdb3c71d02c5d0e29168 Mon Sep 17 00:00:00 2001 From: David Halter Date: Wed, 7 Aug 2013 17:37:14 +0430 Subject: [PATCH] move some docstring tests, #181 --- test/test_docstring.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/test/test_docstring.py b/test/test_docstring.py index c2feb1e8..dc013d22 100644 --- a/test/test_docstring.py +++ b/test/test_docstring.py @@ -34,3 +34,24 @@ class TestDocstring(unittest.TestCase): class DocstringCompletion(): #? [] """ asdfas """''').completions() + + def test_docstrings_type_dotted_import(self): + s = """ + def func(arg): + ''' + :type arg: threading.Thread + ''' + arg.""" + names = [c.name for c in jedi.Script(s).completions()] + assert 'start' in names + + def test_docstrings_type_str(self): + s = """ + def func(arg): + ''' + :type arg: str + ''' + arg.""" + + names = [c.name for c in jedi.Script(s).completions()] + assert 'join' in names