streamrip/tests/util.py
Nathan Thomas 54d05e1330
Fix lints in tests (#682)
* Fix lints on tests

* Formatting

* Formatting
2024-05-14 16:27:41 -07:00

17 lines
305 B
Python

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):
items = []
async for item in async_gen:
items.append(item)
return items
return arun(_afor(async_gen))