$npx skillfedfor your agent

asynctest

Enhance the standard unittest package with features for testing asyncio libraries

With conditionsPyPI TestingReleased May 201911.2M downloads / moApache 2Pure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — asynctest-0.13.0-py3-none-any.whl
v0.13.0 · released 2019-05-14 · Python >=3.5

Yes, if you are testing asyncio code on Python 3.5 or later and need selector-specific mocking utilities. No, if you need active maintenance and bug fixes—the package is dormant and unlikely to receive updates. Verify that asynctest's feature set meets your needs before adopting.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.5 or later; targets the selector model and does not yet support Windows' proactor event loop.
  • Low install friction with no runtime dependencies.
  • Maintenance is dormant—last release was 2019-05-14 and no commits since 2024-04-22—so expect no active bug fixes or feature updates.

License · maintenance · safety

Apache 2 (permissive) — Licensed under Apache 2 (permissive), so you can use, modify, and distribute the package freely with minimal restrictions.

last release 2019-05-14 (2649 days) · last repo commit 2024-04-22 · 310 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 11,182,646 downloads/mo, #1,411 on PyPI

Verify before relying

pip install asynctest

import asynctest
import unittest

class MyAsyncTest(asynctest.TestCase):
    async def test_async_function(self):
        mock = asynctest.CoroutineMock()
        await mock()
        mock.assert_called_once()
  • Whether asynctest's selector-based approach remains compatible with modern Python asyncio implementations.
  • Current community adoption and whether built-in async mock utilities have superseded asynctest's CoroutineMock for most use cases.
Same gist for agents: .md · .json

What it is and what it does

asynctest is a testing library that builds on Python's standard unittest module to reduce boilerplate when writing tests for asyncio code. It provides CoroutineMock objects that properly mock coroutine functions, a TestCase subclass that automatically manages event loops for each test, and utilities to mock file and socket objects for selector-based testing. The library also includes helpers to control loop timing and run timed events without wall-clock delays.

The package is dormant—its last release was in 2019 and it has received no commits since 2024-04-22. It supports Python 3.5 and later but currently targets the selector event loop model and does not support Windows' proactor. You should verify whether asynctest still adds value for your use case before adopting.

Use it for

  • Mock coroutine functions in unit tests without manually wrapping them or managing their return values.
  • Run async test methods and setUp/tearDown coroutines within a managed event loop per test.
  • Control event loop timing in tests via ClockedTestCase to run timed callbacks without waiting for wall-clock time.
  • Mock file and socket objects for testing selector-based I/O code without real network or filesystem calls.
  • Patch async functions and generators with custom behavior using asynctest's patch decorators.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you are testing asyncio code on Python 3.5 or later and need selector-specific mocking utilities.

No, if you need active maintenance and bug fixes—the package is dormant and unlikely to receive updates. Verify that asynctest's feature set meets your needs before adopting.

Install

asynctest on PyPI

Before you install

Low install friction with no runtime dependencies. Maintenance is dormant—last release was 2019-05-14 and no commits since 2024-04-22—so expect no active bug fixes or feature updates.

Requires Python 3.5 or later; targets the selector model and does not yet support Windows' proactor event loop.

License in practice

Licensed under Apache 2 (permissive), so you can use, modify, and distribute the package freely with minimal restrictions.

Quickstart

pip install asynctest

import asynctest
import unittest

class MyAsyncTest(asynctest.TestCase):
    async def test_async_function(self):
        mock = asynctest.CoroutineMock()
        await mock()
        mock.assert_called_once()

Verify before relying

  • Whether asynctest's selector-based approach remains compatible with modern Python asyncio implementations.
  • Current community adoption and whether built-in async mock utilities have superseded asynctest's CoroutineMock for most use cases.

Package facts

LicenseApache 2 permissive
Python supportSupports the current Python release >=3.5
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceDormant 2,649 days since the last release
Last repo commit
First released
Downloads11,182,646 / month, #1,411 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 3 - AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Testing

Evidence: asynctest-0.13.0-py3-none-any.whl

Tags

Capabilities
asyncio unit testingasync mock testingcoroutine mockasyncio test utilitiesasync unittest frameworkevent loop testingasyncio test case
Topics
asyncio-testingmock-utilities
PyPI keywords
unittesttesttestingasynciotulipselectorsasyncmock

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 › “coroutine mock”

  • asynctestExtends Python's unittest module with test utilities and mocks…
  • asyncmockProvides awaitable mock objects for testing async code, extending the…
  • backports_abcProvides backports of abstract base classes (Generator, Coroutine,…

Give your agent the search over MCP, or paste the wish link into any chat.

More Testing packages

pluggy Worth it
PyPI · Libraries · released May 2025

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.

MITpure Python · 3.9+aging
1.3Bdownloads / mo
pytest Worth it
PyPI · Libraries · released Jun 2026

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.

MITpure Python · 3.10+
1.1Bdownloads / mo
virtualenv Worth it
PyPI · Libraries · released Aug 2026

virtualenv creates isolated Python environments where packages can be installed independently without affecting the system Python or other projects.

MITpure Python · 3.9+
532.9Mdownloads / mo
coverage Worth it
PyPI · Testing · released Aug 2026

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.

permissive licensepure Python · 3.10+
335.8Mdownloads / mo
pytest-asyncio Worth it
PyPI · Testing · released May 2026

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.

Apache-2.0pure Python · 3.10+
275.9Mdownloads / mo
pytest-json-ctrf Worth it
PyPI · Testing · released Jul 2026

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.

MITpure Python · 3.8+
273.0Mdownloads / mo

See also aiounittest · asyncmock · TestSlide · aioresponses · syncer · blockbuster · flexmock · nest-asyncio · aiodebug