mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 22:44:27 +08:00
Test generator and lambda
This commit is contained in:
@@ -21,13 +21,18 @@ def make_definitions():
|
|||||||
|
|
||||||
def f():
|
def f():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def g():
|
||||||
|
yield
|
||||||
|
|
||||||
|
h = lambda: None
|
||||||
""")
|
""")
|
||||||
|
|
||||||
definitions = []
|
definitions = []
|
||||||
definitions += api.defined_names(source)
|
definitions += api.defined_names(source)
|
||||||
|
|
||||||
source += textwrap.dedent("""
|
source += textwrap.dedent("""
|
||||||
variable = sys or C or x or f""")
|
variable = sys or C or x or f or g or h""")
|
||||||
lines = source.splitlines()
|
lines = source.splitlines()
|
||||||
script = api.Script(source, len(lines), len('variable'), None)
|
script = api.Script(source, len(lines), len('variable'), None)
|
||||||
definitions += script.definition()
|
definitions += script.definition()
|
||||||
|
|||||||
Reference in New Issue
Block a user