This commit is contained in:
Nathan Thomas 2023-10-22 00:07:17 -07:00
parent 36fd27c83c
commit 7cbd77edc5
13 changed files with 845 additions and 641 deletions

17
tests/util.py Normal file
View file

@ -0,0 +1,17 @@
import asyncio
loop = asyncio.new_event_loop()
def arun(coro):
return loop.run_until_complete(coro)
def afor(async_gen):
async def _afor(async_gen):
l = []
async for item in async_gen:
l.append(item)
return l
return arun(_afor(async_gen))