1
0
forked from VimPlug/jedi

filter all non executables when used with call_signatures, fixes #240

This commit is contained in:
David Halter
2013-08-07 14:36:35 +04:30
parent a79148925d
commit 2ea2a8c6cd
2 changed files with 9 additions and 1 deletions

View File

@@ -15,6 +15,7 @@ import inspect
from .base import TestBase, unittest, cwd_at
import jedi
from jedi import Script
from jedi._compatibility import utf8, unicode, is_py33
from jedi import api, parsing, common
@@ -238,6 +239,12 @@ class TestRegression(TestBase):
s = """import functools; test = getattr(functools, 'partial'); test("""
check(self.function_definition(s), 'partial', 0)
def test_call_signature_on_module(self):
"""github issue #240"""
s = 'import datetime; datetime('
# just don't throw an exception (if numpy doesn't exist, just ignore it)
assert Script(s).call_signatures() == []
def test_function_definition_empty_paren_pre_space(self):
s = textwrap.dedent("""\
def f(a, b):