Commit 765ec60a authored by Stefan Behnel's avatar Stefan Behnel

another Py2.5 test fix

parent b6d2b2fc
...@@ -1006,12 +1006,14 @@ def test_delegating_generators_claim_to_be_running_close(): ...@@ -1006,12 +1006,14 @@ def test_delegating_generators_claim_to_be_running_close():
return ret return ret
_next = next # keep it around for Py<=2.5
def yield_in_return(x): def yield_in_return(x):
""" """
>>> x = yield_in_return(range(3)) >>> x = yield_in_return(range(3))
>>> for _ in range(10): >>> for _ in range(10):
... try: ... try:
... print(next(x)) ... print(_next(x))
... except StopIteration: ... except StopIteration:
... if sys.version_info >= (3,3): ... if sys.version_info >= (3,3):
... print(sys.exc_info()[1].value is None) ... print(sys.exc_info()[1].value is None)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment