import pytest_asyncio @pytest_asyncio.fixture async def foo(): return 1 def test(foo): assert foo == 1