mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-09 07:14:48 +08:00
Add a test for docstring in call signature
This commit is contained in:
@@ -90,6 +90,15 @@ class TestRegression(TestBase):
|
||||
if not is_py25:
|
||||
assert len(r[0].doc) > 100
|
||||
|
||||
def test_function_call_signature(self):
|
||||
defs = self.definition("""
|
||||
def f(x, y=1, z='a'):
|
||||
pass
|
||||
f""")
|
||||
doc = defs[0].doc
|
||||
doc = defs[0].doc # removing this line won't work
|
||||
assert "f(x, y = 1, z = 'a')" in doc
|
||||
|
||||
def test_definition_at_zero(self):
|
||||
assert self.definition("a", (1, 1)) == []
|
||||
s = self.definition("str", (1, 1))
|
||||
|
||||
Reference in New Issue
Block a user