Fix an issue with docstrings that contain errors

This commit is contained in:
Dave Halter committed 2018-03-20 00:56:53 +01:00
1 parent 305fd66e1c
commit a61742728b
3 files changed
+23 -3

No files matched your search

+15
View File
@@ -196,6 +196,21 @@ def test_numpydoc_parameters_alternative_types():
assert 'append' in names
@pytest.mark.skipif(numpydoc_unavailable,
reason='numpydoc module is unavailable')
def test_numpydoc_invalid():
s = dedent('''
def foobar(x, y):
"""
Parameters
----------
x : int (str, py.path.local
"""
x.''')
assert not jedi.Script(s).completions()
@pytest.mark.skipif(numpydoc_unavailable,
reason='numpydoc module is unavailable')
def test_numpydoc_returns():