@pytest.mark.tryfirst
def pytest_pyfunc_call(pyfuncitem):
    if 'async' in pyfuncitem.keywords:
        loop_ = pyfuncitem.funcargs['loop']
        funcargs = pyfuncitem.funcargs
        testargs = {arg: funcargs[arg]
                    for arg in pyfuncitem._fixtureinfo.argnames}
        coro = muffin.to_coroutine(pyfuncitem.obj)
        loop_.run_until_complete(asyncio.async(coro(**testargs), loop=loop_))
        return True
The main entry-point for the service called by the service runner.
dataset/ETHPy150Open klen/muffin/muffin/pytest.py/pytest_pyfunc_call--crossover with--dataset/ETHPy150Open pantsbuild/pants/src/python/pants/pantsd/service/pants_service.py/PantsService.run