Commit b612885e authored by Stefan Behnel's avatar Stefan Behnel

another Py2.5 test fix

--HG--
extra : transplant_source : %B0%FFOZ%A1%AE%0F%18%A1%D9N%15W%11%5C%60%5E%02%FD%E6
parent c08752f5
...@@ -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