projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9718098
)
Add test for lambda inside generator
author
Vitja Makarov
<vitja.makarov@gmail.com>
Sat, 29 Jan 2011 12:02:17 +0000
(15:02 +0300)
committer
Vitja Makarov
<vitja.makarov@gmail.com>
Sat, 29 Jan 2011 12:02:17 +0000
(15:02 +0300)
tests/run/generators.pyx
patch
|
blob
|
history
diff --git
a/tests/run/generators.pyx
b/tests/run/generators.pyx
index 0060eba33250fb860c991155868dac7b25357b70..b38a48b49d21c7f456d400bbc87381cf61eadabe 100644
(file)
--- a/
tests/run/generators.pyx
+++ b/
tests/run/generators.pyx
@@
-307,3
+307,11
@@
def test_nested_gen(int n):
"""
for a in range(n):
yield (b for b in range(a))
+
+def test_lambda(n):
+ """
+ >>> [i() for i in test_lambda(3)]
+ [0, 1, 2]
+ """
+ for i in range(n):
+ yield lambda : i