mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 06:24:27 +08:00
Don't display unnecessary help, fixes #1557
This commit is contained in:
@@ -120,3 +120,13 @@ def test_docstring_decorator(goto_or_help_or_infer, skip_python2):
|
||||
@pytest.mark.parametrize('code', ['', '\n', ' '])
|
||||
def test_empty(Script, code):
|
||||
assert not Script(code).help(1, 0)
|
||||
|
||||
|
||||
@pytest.mark.parametrize('code', ['f()', '(bar or baz)', 'f[3]'])
|
||||
def test_no_help_for_operator(Script, code):
|
||||
assert not Script(code).help()
|
||||
|
||||
|
||||
@pytest.mark.parametrize('code', ['()', '(1,)', '[]', '[1]', 'f[]'])
|
||||
def test_help_for_operator(Script, code):
|
||||
assert Script(code).help()
|
||||
|
||||
Reference in New Issue
Block a user