# pytest-dev/pytest-asyncio

Asyncio support for pytest

Repository: https://github.com/pytest-dev/pytest-asyncio
Canonical: https://ross.abutalabs.com/products/pytest-asyncio
Homepage: https://pytest-asyncio.readthedocs.io
Language: Python
License: Apache-2.0
License Family: permissive
Topics: asyncio, pytest-plugin, python, testing
Last push: 2026-08-26T19:16:01+00:00

## Health v2 (maintenance only)
Score: 90/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 74, longevity 100
- inputs: {"age_days": 4163, "days_push": 7, "days_rel": 99, "gap_med": 52.5, "n_releases_24m": 11}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1657, forks 199 (observed 2026-08-28T04:05:18.127974+00:00)

## What it is
A pytest plugin that enables testing of asyncio-based Python code by supporting coroutines as test functions. It lets developers write async test functions with the @pytest.mark.asyncio marker and await code directly inside tests.

## Use cases
- test async python functions with pytest
- run coroutine test functions in pytest
- await async code inside unit tests
- test asyncio-based libraries
- write async test cases for python web services

## When to choose
- you use pytest and need to test asyncio coroutines
- your python codebase uses async/await and you want idiomatic pytest tests
- you want a lightweight plugin rather than a separate async test framework

## When to avoid
- your tests subclass unittest.TestCase - use unittest.IsolatedAsyncioTestCase instead
- you don't use pytest as your test runner
- you need to test other async frameworks like trio (use trio's pytest plugin)

## Facets
- artifact type: plugin
- maturity: stable
- function: testing, e2e-testing
- domain: testing, developer-tools
- platform: python, cli
- tags: pytest-plugin, asyncio, coroutines, unit-testing

## Member repositories
- pytest-dev/pytest-asyncio (main) score 90

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:18.127974+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:44:47.344779+00:00, confidence not recorded.
  - readme: https://github.com/pytest-dev/pytest-asyncio (fetched 2026-08-28T04:05:18.127974+00:00, sha a02b898b031e)
  - registry_pypi: https://pypi.org/pypi/pytest-asyncio/json (fetched 2026-08-29T11:18:02.636352+00:00, sha 7513f0ca96eb)
- Data as of 2026-08-30T08:39:29.467469+00:00.
