From c8c1113c55659c72603247452ec6be6767a5b319 Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Fri, 15 Mar 2013 14:26:58 +0100 Subject: [PATCH] Test generator and lambda --- test/test_api_classes.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/test_api_classes.py b/test/test_api_classes.py index 69bbf2b3..bcb7a722 100644 --- a/test/test_api_classes.py +++ b/test/test_api_classes.py @@ -21,13 +21,18 @@ def make_definitions(): def f(): pass + + def g(): + yield + + h = lambda: None """) definitions = [] definitions += api.defined_names(source) 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() script = api.Script(source, len(lines), len('variable'), None) definitions += script.definition()