Pytest plugin for testing async Python code. Provides fixtures and markers for running async tests with pytest. Supports asyncio, trio, and other async frameworks. Current version 2.1.7, released under Apache 2.0 license. Active development, weekly commits.
pip install pytest-aioVerified import paths — ran on the pinned version, not inferred.
Basic async test using pytest-aio. Mark test with @pytest.mark.asyncio.
Upgrade to 2.x or mark async fixtures explicitly.
Remove marker and simply write 'async def test_async():'
Ensure Python >=3.10 and update tests to remove markers.
Use 'import asyncio' directly (stdlib), not from pytest_aio.
Remove 'loop' argument; pytest-aio 2.x handles event loop automatically.
Run 'pip install pytest-aio' in your environment.