3.7+ "async with" handling from decompyle3

This commit is contained in:
rocky
2020-02-08 19:48:09 -05:00
parent e1758a8730
commit 8495d208fb
9 changed files with 146 additions and 47 deletions

View File

@@ -10,3 +10,14 @@ async def test_enter(self):
x = 1
y = 2
assert manager is context
# From 3.7.6 test_coroutines.py
# Bug was different form of code for "async with" below
class CoroutineTest():
def test_with_8(self):
CNT = 0
async def foo():
nonlocal CNT
async with CM():
CNT += 1
return