aiounittest
Test asyncio code more easily.
Decision gist · record as of 2026-08-14
Yes, but with conditions. Install if you are maintaining code on Python 3.4–3.7 or need to test asyncio code in an existing unittest suite. For new projects targeting Python 3.8+, prefer the standard library's unittest.IsolatedAsyncioTestCase instead. The package is stable and permissively licensed, but aging maintenance means it may not receive updates for new Python features.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with a single runtime dependency (wrapt).
- Maintenance status is aging—last release was 525 days ago, though the repository remains active with a recent commit on 2026-01-19.
- For Python 3.8+, the standard library's unittest.IsolatedAsyncioTestCase is now the recommended alternative.
License · maintenance · safety
MIT (permissive) — MIT license is permissive, allowing use in commercial and private projects with minimal restrictions beyond attribution.
last release 2025-03-07 (525 days) · last repo commit 2026-01-19 · 58 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 300,487 downloads/mo, #7,841 on PyPI
Alternatives
Verify before relying
pip install aiounittest
import asyncio
import aiounittest
class MyTest(aiounittest.AsyncTestCase):
async def test_async_add(self):
result = await asyncio.sleep(0.1)
self.assertEqual(result, None)- Whether wrapt dependency is required at runtime or only for specific features
- Current test coverage and whether the package is actively maintained despite aging status
- Performance characteristics compared to unittest.IsolatedAsyncioTestCase in Python 3.8+
What it is and what it does
aiounittest is a test helper library that extends unittest.TestCase to support testing asyncio code using async/await syntax. It lets you write test methods as async functions and run them within an event loop, while still supporting synchronous tests in the same class. The library also provides utilities like AsyncMockIterator for mocking async iterators and futurized mocks for coroutines.
The package is designed to bridge the gap between unittest and asyncio, making it easier to test asynchronous code without boilerplate. However, for Python 3.8 and newer, the standard library now includes unittest.IsolatedAsyncioTestCase, which provides built-in asyncio support and may be preferable for new projects targeting recent Python versions.
Use it for
- Testing async functions and coroutines in projects targeting Python 3.4–3.7 before IsolatedAsyncioTestCase was available
- Writing mixed test suites with both synchronous and asynchronous test methods in a single class
- Mocking async iterators and coroutines using the library's AsyncMockIterator and futurized utilities
- Migrating legacy asyncio test code that predates Python 3.8's built-in async test support
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, but with conditions.
Install if you are maintaining code on Python 3.4–3.7 or need to test asyncio code in an existing unittest suite. For new projects targeting Python 3.8+, prefer the standard library's unittest.IsolatedAsyncioTestCase instead. The package is stable and permissively licensed, but aging maintenance means it may not receive updates for new Python features.
Install
aiounittest on PyPI
Before you install
Low install friction with a single runtime dependency (wrapt). Maintenance status is aging—last release was 525 days ago, though the repository remains active with a recent commit on 2026-01-19. For Python 3.8+, the standard library's unittest.IsolatedAsyncioTestCase is now the recommended alternative.
License in practice
MIT license is permissive, allowing use in commercial and private projects with minimal restrictions beyond attribution.
Quickstart
pip install aiounittest
import asyncio
import aiounittest
class MyTest(aiounittest.AsyncTestCase):
async def test_async_add(self):
result = await asyncio.sleep(0.1)
self.assertEqual(result, None)
Verify before relying
- Whether wrapt dependency is required at runtime or only for specific features
- Current test coverage and whether the package is actively maintained despite aging status
- Performance characteristics compared to unittest.IsolatedAsyncioTestCase in Python 3.8+
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagewrapt |
| Maintenance | Aging 525 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 300,487 / month, #7,841 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9 |
Evidence: aiounittest-1.5.0-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 › “asyncio unit testing”
- aiounittestProvides a test case class for writing unit tests of asyncio code…
- asynctestExtends Python's unittest module with test utilities and mocks…
- mongomock-motorProvides an async mock client for MongoDB that mimics the…
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 syncer · asynctest · synchronicity · aiointercept · threadloop · asyncmock · parametrize · TestSlide · softest