projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4292840
)
add test case for copied yield
author
Vitja Makarov
<vitja.makarov@gmail.com>
Sun, 9 Jan 2011 11:07:01 +0000
(14:07 +0300)
committer
Vitja Makarov
<vitja.makarov@gmail.com>
Sun, 9 Jan 2011 11:07:01 +0000
(14:07 +0300)
tests/run/generators.pyx
patch
|
blob
|
history
diff --git
a/tests/run/generators.pyx
b/tests/run/generators.pyx
index 42e61352743de6904e16d01c39a988c8f8524987..ca2bd32b8d25709cd433d251db0981a58996b6af 100644
(file)
--- a/
tests/run/generators.pyx
+++ b/
tests/run/generators.pyx
@@
-259,3
+259,16
@@
def test_return(a):
yield 1
a['i_was_here'] = True
return
+
+def test_copied_yield(foo):
+ """
+ >>> class Manager(object):
+ ... def __enter__(self):
+ ... return self
+ ... def __exit__(self, type, value, tb):
+ ... pass
+ >>> list(test_copied_yield(Manager()))
+ [1]
+ """
+ with foo:
+ yield 1