mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 22:14:27 +08:00
create an is_callable method for all representation objects, to determine if something is callable or not
This commit is contained in:
@@ -206,12 +206,11 @@ def test_signature_is_definition():
|
||||
|
||||
def test_no_signature():
|
||||
# str doesn't have a __call__ method
|
||||
assert Script('str()(').call_signatures == []
|
||||
assert Script('str()(').call_signatures() == []
|
||||
|
||||
s = dedent("""\
|
||||
class X():
|
||||
pass
|
||||
X()(
|
||||
""")
|
||||
assert Script(s).call_signatures == []
|
||||
assert len(Script(s, column=2).call_signatures) == 1
|
||||
X()(""")
|
||||
assert Script(s).call_signatures() == []
|
||||
assert len(Script(s, column=2).call_signatures()) == 1
|
||||
|
||||
Reference in New Issue
Block a user