pytest-asyncio 0.26.0
pip install pytest-asyncio
Released:
Pytest support for asyncio
Navigation
Verified details
These details have been verified by PyPIMaintainers
Meta
Unverified details
These details have not been verified by PyPIProject links
Meta
-
License Expression: Apache-2.0
SPDX License Expression - Requires: Python >=3.9
-
Provides-Extra:
docs
,testing
Classifiers
- Development Status
- Framework
- Intended Audience
- Programming Language
- Topic
- Typing
Project description
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.
Project details
Verified details
These details have been verified by PyPIMaintainers
Meta
Unverified details
These details have not been verified by PyPIProject links
Meta
-
License Expression: Apache-2.0
SPDX License Expression - Requires: Python >=3.9
-
Provides-Extra:
docs
,testing
Classifiers
- Development Status
- Framework
- Intended Audience
- Programming Language
- Topic
- Typing
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pytest_asyncio-0.26.0.tar.gz
.
File metadata
- Download URL: pytest_asyncio-0.26.0.tar.gz
- Upload date:
- Size: 54.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4df2a697648241ff39e7f0e4a73050b03f123f760673956cf0d72a4990e312f |
|
MD5 | 6463f56f564ab33b34b9ab59a779f434 |
|
BLAKE2b-256 | 8ec4453c52c659521066969523e87d85d54139bbd17b78f09532fb8eb8cdb58e |
File details
Details for the file pytest_asyncio-0.26.0-py3-none-any.whl
.
File metadata
- Download URL: pytest_asyncio-0.26.0-py3-none-any.whl
- Upload date:
- Size: 19.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b51ed894f4fbea1340262bdae5135797ebbe21d8638978e35d31c6d19f72fb0 |
|
MD5 | 423ade7a0ff0e231aa55a425f1780062 |
|
BLAKE2b-256 | 207f338843f449ace853647ace35870874f69a764d251872ed1b4de9f234822c |