pytest-aio
Pytest plugin for testing async python code
Decision gist · record as of 2026-08-14
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.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python >= 3.10
- 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 · maintenance · safety
MIT (permissive) — MIT license (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source contexts.
last release 2026-02-12 (183 days) · last repo commit 2026-02-12 · 15 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 77,898 downloads/mo, #14,483 on PyPI
Alternatives
Verify before relying
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- 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
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 on this page. Verify before relying on it.
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
pytest-aio on PyPI
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.
Requires Python >= 3.10
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
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 the current Python release <4,>=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagepytest |
| Maintenance | Aging 183 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 77,898 / month, #14,483 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableFramework :: PytestIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Testing |
Evidence: pytest_aio-2.1.7-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “run async tests with pytest”
- pytest-aioA pytest plugin that automatically runs async test functions and…
- pytest-asyncio-concurrentA pytest plugin that executes async test functions concurrently…
- pytest-trioA pytest plugin that enables testing of async code written with Trio,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Testing packages
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
virtualenv creates isolated Python environments where packages can be installed independently without affecting the system Python or other projects.
Coverage.py measures which lines of Python code are executed during test runs, reporting coverage percentages and identifying untested code paths.
Install it if you want to measure test completeness or enforce coverage thresholds in your project.
pytest-asyncio is a pytest plugin that enables writing and running async test functions using the asyncio library, allowing developers to await code directly within test cases.
Install it if you write tests for any asyncio-based code.
A pytest plugin that generates test reports in Common Test Report Format (CTRF) as JSON, compatible with pytest-xdist and pytest-playwright for distributed and browser-based testing.
Install it if you need CTRF-formatted test output for CI/CD integration or cross-tool reporting.
See also pytest-trio · async_generator · pytest-tornado · pytest-tornasync · rtest · aiologic · pytest-redis · pytest-docker · pytest-rabbitmq · pytest-operator