1
0
forked from VimPlug/jedi

Test for the equals that is added to params sometimes. Refs #582.

This commit is contained in:
Dave Halter
2016-07-20 09:27:28 +02:00
parent 7ee08d01fd
commit a2d66579d7

View File

@@ -333,3 +333,19 @@ class TestGotoAssignments(TestCase):
assert len(ass) == 1
assert ass[0].name == 'json'
assert ass[0].type == 'module'
def test_added_equals_to_params():
def run(rest_source):
source = dedent("""
def foo(bar):
pass
""")
results = Script(source + rest_source).completions()
assert len(results) == 1
return results[0]
assert run('foo(bar').name_with_symbols == 'bar='
assert run('foo(bar').complete == '='
assert run('foo(bar').name_with_symbols == 'bar'
assert run(' bar').complete == ''