Files
python-uncompyle6/test/simple_source/bug37/04_async.py
rocky e39c6c7f0a Fix "with as" indenting and decorated "async def"
Misc other improvements: make check-short now is short
2019-12-18 09:14:09 -05:00

13 lines
383 B
Python

# from 3.7 test_contextlib_async.py
# Bugs were not adding "async" when a function is a decorator,
# and a misaligment when using "async with as".
@_async_test
async def test_enter(self):
self.assertIs(await manager.__aenter__(), manager)
async with manager as context:
async with woohoo() as x:
x = 1
y = 2
assert manager is context