projects
/
platform
/
upstream
/
python-cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7826127
)
Py2.5 test fix
author
Stefan Behnel
<stefan_ml@behnel.de>
Sat, 6 Jul 2013 14:08:50 +0000
(16:08 +0200)
committer
Stefan Behnel
<stefan_ml@behnel.de>
Sat, 6 Jul 2013 14:08:50 +0000
(16:08 +0200)
tests/run/yield_from_pep380.pyx
patch
|
blob
|
history
diff --git
a/tests/run/yield_from_pep380.pyx
b/tests/run/yield_from_pep380.pyx
index
fc54e94
..
f0a039d
100644
(file)
--- a/
tests/run/yield_from_pep380.pyx
+++ b/
tests/run/yield_from_pep380.pyx
@@
-1009,12
+1009,18
@@
def test_delegating_generators_claim_to_be_running_close():
def yield_in_return(x):
"""
>>> x = yield_in_return(range(3))
- >>>
while True
:
+ >>>
for _ in range(10)
:
... try:
... print(next(x))
- ... except StopIteration as exc:
- ... print(exc.value)
- ... break
+ ... except StopIteration:
+ ... if sys.version_info >= (3,3):
+ ... print(sys.exc_info()[1].value is None)
+ ... else:
+ ... print(True)
+ ... break
0
+ 1
+ 2
+ True
"""
return (yield from x)