Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

pytest-asyncio

https://img.shields.io/pypi/v/pytest-asyncio.svg https://github.com/pytest-dev/pytest-asyncio/workflows/CI/badge.svg https://codecov.io/gh/pytest-dev/pytest-asyncio/branch/main/graph/badge.svg Supported Python versions https://img.shields.io/badge/code%20style-black-000000.svg

pytest-asyncio is a pytest plugin. It facilitates testing of code that uses the asyncio 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:

@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.

Note that test classes subclassing the standard unittest library are not supported. Users are advised to use unittest.IsolatedAsyncioTestCase or an async framework such as asynctest.

pytest-asyncio is available under the Apache License 2.0.

Installation

To install pytest-asyncio, simply:

$ 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 the coverage at least stays the same before you submit a pull request.

Metadata

Release files for pytest-asyncio 0.23.0a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytest-asyncio 0.23.0a1
File Size Uploaded Provenance Actions
pytest-asyncio-0.23.0a1.tar.gz 40.7 kB Without provenance Details for pytest-asyncio-0.23.0a1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pytest-asyncio 0.23.0a1
File Interpreter ABI Platform Actions
pytest_asyncio-0.23.0a1-py3-none-any.whl Python 3 none any Details for pytest_asyncio-0.23.0a1-py3-none-any.whl

Total release size: 57.8 kB

Release files / pytest-asyncio-0.23.0a1.tar.gz

Download URL pytest-asyncio-0.23.0a1.tar.gz
Size 40.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e2d225d13340203a6388e36fc31e73f05a1193faed7a3d44adcfdfde246f2553
BLAKE2b-256 checksum
How to use checksums
6401b7331ede0c3920bd23fe54b391e99bdc115f6f4e2f702b1c697c6fca9670
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Release files / pytest_asyncio-0.23.0a1-py3-none-any.whl

Download URL pytest_asyncio-0.23.0a1-py3-none-any.whl
Size 17.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6d8663804361ca940d5ecdc4b26464d0b9ae35aece5fdcb447a219d23d2882e8
BLAKE2b-256 checksum
How to use checksums
bfcaf58ace23d5384499cdc25ef5aede8f2abc0068997d2ec8bed454b2290a99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Security for pytest-asyncio 0.23.0a1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page