async def io_loop(event_loop, request):
    """Same as pytest-tornado.io_loop, but runs with pytest-asyncio"""
    io_loop = AsyncIOMainLoop()
    assert io_loop.asyncio_loop is event_loop

    def _close():
        io_loop.close(all_fds=True)

    request.addfinalizer(_close)
    return io_loop
Same as pytest-tornado.io_loop, but runs with pytest-asyncio
binderhub/tests/conftest.py