Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Comment out test with async for comprehension
  • Loading branch information
fanninpm committed Apr 20, 2022
commit 15129a955b1aef94f922620a959fadcca1f257c9
20 changes: 11 additions & 9 deletions Lib/test/test_asyncgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,15 +507,16 @@ def __anext__(self):
return self.yielded
self.check_async_iterator_anext(MyAsyncIterWithTypesCoro)

def test_async_gen_aiter(self):
async def gen():
yield 1
yield 2
g = gen()
async def consume():
return [i async for i in aiter(g)]
res = self.loop.run_until_complete(consume())
self.assertEqual(res, [1, 2])
# TODO: RUSTPYTHON: async for gen expression compilation
# def test_async_gen_aiter(self):
# async def gen():
# yield 1
# yield 2
# g = gen()
# async def consume():
# return [i async for i in aiter(g)]
# res = self.loop.run_until_complete(consume())
# self.assertEqual(res, [1, 2])

def test_async_gen_aiter_class(self):
results = []
Expand Down Expand Up @@ -1561,6 +1562,7 @@ async def main():
# res = self.loop.run_until_complete(run())
# self.assertEqual(res, [i * 2 for i in range(10)])

# TODO: RUSTPYTHON: async for gen expression compilation
# def test_async_gen_expression_02(self):
# async def wrap(n):
# await asyncio.sleep(0.01)
Expand Down