Fix More 3.6 async parsing

... all from 3.6 test_coroutines.py.

More bugs remain
This commit is contained in:
rocky
2022-05-05 07:36:06 -04:00
parent c5efec1e6f
commit 8576117d00
4 changed files with 41 additions and 2 deletions

View File

@@ -0,0 +1,39 @@
# These are from 3.6 test_coroutines.py
async def iterate(gen):
res = []
async for i in gen:
res.append(i)
return res
def test_comp_5(f):
# async def f(it):
# for i in it:
# yield i
async def run_list():
return [i
for
pair in
([10, 20])
async for i
in f
]
async def test2(x, buffer, f):
with x:
async for i in f:
if i:
break
else:
buffer()
buffer()
async def test3(x, buffer, f):
with x:
async for i in f:
if i:
continue
buffer()
else:
buffer.append()
buffer()