tests: Add 6 tests for async await/for/with.

This commit is contained in:
Damien George
2016-04-13 15:27:06 +01:00
parent eacbd7aeba
commit c33df193bf
6 changed files with 175 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
# test simple async with execution
class AContext:
async def __aenter__(self):
print('enter')
async def __aexit__(self, exc_type, exc, tb):
print('exit')
async def f():
async with AContext():
print('body')
o = f()
try:
o.send(None)
except StopIteration:
print('finished')