pytest-async is a lightweight Pytest plugin for testing async functions. It automatically runs coroutines in an event loop without requiring decorators like @pytest.mark.asyncio. Current version 0.1.1 targets Python >=3.6. It is in maintenance mode with limited updates.
pip install pytest-async==0.1.1No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Define async test functions directly; no decorator needed. Pytest automatically runs them in an event loop.
Use synchronous fixtures or mark non-test async functions with @pytest.fixture but note that pytest-async may still attempt to run them. Consider using pytest-asyncio for more control.
Migrate to pytest-asyncio: install pytest-asyncio, remove pytest-async, and add @pytest.mark.asyncio decorator to async tests.
Upgrade to Python 3.8 or lower, or switch to pytest-asyncio.
Ensure test function is defined with 'async def' and that pytest-async is installed correctly. If using pytest-asyncio, add @pytest.mark.asyncio.