PYPI PACKAGE AUDIT v1.5.0 Enterprise Healthy

pytest-asyncio

Pytest support for asyncio

PyPkgScore pytest-asyncio
Methodology & Criteria ♥ Donate
855 / 1000
Quick Install
pip install pytest-asyncio
1. Governance
100/200
2. PEP Metadata
200/200
3. Security
200/200
4. Docs & SEO
155/200
5. CI Engineering
200/200
📣 Share Audit: Share this report and visual preview in the current language
Advertisement
PYPI TELEMETRY

Downloads & Community Adoption

Last 30 days (without mirrors)
Last 7 days
69191719
Last 30 days
293477009
Total (180 days)
1541919472
Metric / Ecosystem Status / Value Source
Downloads (30d / 180d) — PyPI Stats (without mirrors)
Trusted Publishing (PEP 740) ✓ Verified OIDC PyPI Integrity / Sigstore
Django Packages — djangopackages.org
PyTech / PyPkgScore 855 / 1000 PyPkgScore Engine

Health & Engineering Analysis (5 Pillars)

1. Governance & Community100 / 200 ▾
LICENSE✓ 50 pts
SECURITY.md✓ 50 pts
CONTRIBUTING.md✕ 0 pts
CODE_OF_CONDUCT.md✕ 0 pts
2. PEP Metadata & Packaging200 / 200 ▾
Wheel (.whl)✓ 50 pts
pyproject.toml✓ 50 pts
Project URLs✓ 50 pts
Trove Classifiers✓ 50 pts
3. Security & Supply Chain200 / 200 ▾
Zero CVEs (OSV)✓ 60 pts
Trusted Publishing (OIDC)✓ 50 pts
Snyk / Audit Link✓ 40 pts
HTTPS Repository✓ 50 pts
4. Documentation, SEO & Ecosystem155 / 200 ▾
Structured README✓ 60 pts
Read the Docs✓ 50 pts
Django Packages✕ 0 pts
Website / Technical Articles✓ 45 pts
5. Engineering, CI & Quality200 / 200 ▾
Automated Tests✓ 65 pts
GitHub Actions CI✓ 65 pts
CHANGELOG.md✓ 35 pts
Env & Lockfile (uv/rye/poetry/pdm/hatch)✓ 35 pts
Advertisement
README & DOCS

Official Documentation & Usage Guide — pytest-asyncio

PyPI Metadata v1.5.0
Show full original documentation (English README) ▾

pytest-asyncio

.. image:: https://img.shields.io/pypi/v/pytest-asyncio.svg :target: https://pypi.python.org/pypi/pytest-asyncio .. image:: https://github.com/pytest-dev/pytest-asyncio/workflows/CI/badge.svg :target: https://github.com/pytest-dev/pytest-asyncio/actions?workflow=CI .. image:: https://codecov.io/gh/pytest-dev/pytest-asyncio/branch/main/graph/badge.svg :target: https://codecov.io/gh/pytest-dev/pytest-asyncio .. image:: https://img.shields.io/pypi/pyversions/pytest-asyncio.svg :target: https://github.com/pytest-dev/pytest-asyncio :alt: Supported Python versions .. image:: https://img.shields.io/badge/Matrix-%23pytest--asyncio-brightgreen :alt: Matrix chat room: #pytest-asyncio :target: https://matrix.to/#/#pytest-asyncio:matrix.org

pytest-asyncio <https://pytest-asyncio.readthedocs.io/en/stable/>_ is a pytest <https://docs.pytest.org/en/latest/contents.html>_ plugin. It facilitates testing of code that uses the asyncio <https://docs.python.org/3/library/asyncio.html>_ library.

Specifically, pytest-asyncio provides support for coroutines as test functions. This allows users to await code inside their tests. For example, the following code is executed as a test item by pytest:

.. code-block:: python

@pytest.mark.asyncio
async def test_some_asyncio_code():
    res = await library.do_something()
    assert b"expected result" == res

More details can be found in the documentation <https://pytest-asyncio.readthedocs.io/en/stable/>_.

Note that test classes subclassing the standard unittest <https://docs.python.org/3/library/unittest.html>__ library are not supported. Users are advised to use unittest.IsolatedAsyncioTestCase <https://docs.python.org/3/library/unittest.html#unittest.IsolatedAsyncioTestCase>__ or an async framework such as asynctest <https://asynctest.readthedocs.io/en/latest>__.

pytest-asyncio is available under the Apache License 2.0 <https://github.com/pytest-dev/pytest-asyncio/blob/main/LICENSE>_.

Installation

To install pytest-asyncio, simply:

.. code-block:: bash

$ pip install pytest-asyncio

This is enough for pytest to pick up pytest-asyncio.

Contributing

Contributions are very welcome.

Tests can be run with tox. Please ensure that all tests are passing and coverage at least stays the same before opening a pull request and marking it as ready for review.

Use of AI in contributions, including issues, pull requests, and comments, must follow our AI policy <.github/AI_POLICY.md>_.