pytest-motor
A pytest plugin for Motor, the non-blocking MongoDB driver.
Installation
To install pytest-motor, run:
pip install pytest-motor
Example
from motor.motor_asyncio import AsyncIOMotorClient
import pytest
@pytest.mark.asyncio
async def test_using_motor_client(motor_client: AsyncIOMotorClient) -> None:
"""This test has access to a Motor client."""
await motor_client.server_info()
How it works
When a test session runs, pytest-motor checks that the mongod binary is present in the
.mongod subdirectory of the pytest root path. If it is not preset, it will be downloaded. This
means that the first run make take some time. Subsequent runs will be faster.
Each test function uses a new motor_client and database. (This may change in the future.)
Limitations
pytest-motor currently supports:
- Ubuntu 16.04*, 18.04, and 20.04
- Debian 9.2* and 10.0*
- MacOS
- Windows
*NOT tested.
If you would like support for another system, please make a GitHub Issue. Contributions are welcome!
Metadata
Release files for pytest-motor 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pytest-motor-0.3.0.tar.gz | 6.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytest_motor-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.8 kB
Release files / pytest-motor-0.3.0.tar.gz
| Download URL | pytest-motor-0.3.0.tar.gz |
|---|---|
| Size | 6.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e189c57ccf8e12d431f9d645f6bb789becff5e5a18b0aef1906833cf5e19d56a
|
|
BLAKE2b-256 checksum How to use checksums |
cc8edcfda5b5ca6f744eaa93cd02eb4f85e69024518b480d586ec99a6ac5ae53
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.6.14
|
Release files / pytest_motor-0.3.0-py3-none-any.whl
| Download URL | pytest_motor-0.3.0-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0f63d9f55e89d7d1a66966c4599f46bed563fcd2b2e2aa3ad042d9d3561a9e14
|
|
BLAKE2b-256 checksum How to use checksums |
50f8955b192df7344962562c9a29640fd05c0981642ccee06822cc1ba7886f76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.6.14
|
Security for pytest-motor 0.3.0
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.