Commit 18cebc31 authored by Stefan Behnel's avatar Stefan Behnel

tighten test assertions to assure that the exception control flow in await is correct

parent 6e3c7cee
...@@ -903,9 +903,10 @@ class AsyncGenAsyncioTest(unittest.TestCase): ...@@ -903,9 +903,10 @@ class AsyncGenAsyncioTest(unittest.TestCase):
DONE += 1000 DONE += 1000
yield v * 2 yield v * 2
finally: finally:
assert sys.exc_info()[0] == ZeroDivisionError
await asyncio.sleep(0.01, loop=self.loop) await asyncio.sleep(0.01, loop=self.loop)
await asyncio.sleep(0.01, loop=self.loop) await asyncio.sleep(0.01, loop=self.loop)
DONE = 1 DONE += 1
async def run(): async def run():
g = gen() g = gen()
......
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