1
0
forked from VimPlug/jedi

Create a name for the generators.

This commit is contained in:
Dave Halter
2017-01-04 18:12:33 +01:00
parent cd23499fbe
commit 01099ce5a9
2 changed files with 9 additions and 0 deletions

View File

@@ -119,6 +119,11 @@ def test_goto_definitions_on_non_name():
assert api.Script('import x', column=0).goto_definitions() == []
def test_goto_definitions_on_generator():
def_, = api.Script('def x(): yield 1\ny=x()\ny').goto_definitions()
assert def_.name == 'generator'
def test_goto_definition_not_multiple():
"""
There should be only one Definition result if it leads back to the same