Welcome to pytest-asyncio!
Specifically, pytest-asyncio provides support for coroutines as test functions. This allows users to await code inside their tests. For example, the following code is executed as a test item by pytest:
@pytest.mark.asyncio async def test_some_asyncio_code(): res = await library.do_something() assert b"expected result" == res
pytest-asyncio is available under the Apache License 2.0.