--- id: pytest-aio version: "2.1.7" license: MIT license_treatment: permissive maintenance: aging --- # pytest-aio — Pytest plugin for testing async python code License: permissive · Maintenance: aging · Downloads: 77.9K/mo ## What it is and what it does pytest-aio is a pytest plugin that detects and runs async test functions and fixtures without requiring explicit markers or decorators. It supports asyncio, trio, and curio as async backends, automatically parametrizing tests across all installed backends by default. The plugin handles contextvars correctly for both async and sync fixtures, and includes a helper fixture (aiosleep) that abstracts over the sleep function of whichever backend is currently running. You install it alongside pytest and write async test functions as you normally would; the plugin intercepts them at collection time and runs them through the appropriate event loop. You can customize which backends run globally via a fixture override, or mark individual tests to run on specific backends. It's designed for straightforward async testing without boilerplate. Use it for: - Testing asyncio-based applications without writing wrapper functions or using pytest-asyncio decorators - Running the same test suite against multiple async backends (asyncio, trio, curio) to verify compatibility - Using async fixtures in sync tests by including the aiolib fixture to manage the event loop lifecycle - Testing trio-asyncio interop code by parametrizing the aiolib fixture with trio+asyncio configuration - Verifying async code with custom event loop factories (e.g., uvloop) by passing backend options ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. A pytest plugin that automatically runs async test functions and fixtures without requiring special markers, supporting asyncio, trio, and curio backends. Yes. It is a lightweight, permissively licensed plugin with no security vulnerabilities, low install friction, and straightforward async test support. The aging maintenance status is not a blocker—the codebase is stable and the repo remains active. Install it if you need to test async Python code with pytest and want to avoid boilerplate or test across multiple async backends. ## Install pip install pytest-aio uv add pytest-aio poetry add pytest-aio ## Installing pytest-aio Before you install: Low friction—pure Python wheel with only pytest as a runtime dependency. Maintenance is aging (183 days since last release), but the repo remains active and the project is marked Production/Stable. License in practice: MIT license (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source contexts. Quickstart: pip install pytest-aio # In your test file: async def test_async(): assert True # Run with pytest as normal # pytest will automatically run the async test Requires Python >= 3.10 Verify before relying: - Whether the plugin's automatic backend selection (asyncio, trio, curio by default) covers all common async testing scenarios without configuration - Performance characteristics when running large test suites across multiple backends ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 77.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags pytest async test plugin, run async tests with pytest, asyncio trio curio testing, pytest async fixtures, async test runner, async-testing, pytest-plugin, multi-backend [View on SkillFed](https://skillfed.io/packages/pytest-aio) · [View on PyPI](https://pypi.org/project/pytest-aio/)