pytest-results
Easily spot regressions in your tests.
A Pytest plugin for snapshot testing: a test returns a value, the plugin stores it in a snapshot file, and compares the next runs with it.
Installation
⚠️ Requires Python 3.12 or higher
pip install pytest-results
Quick start
Return the value to check from your test:
def test_function():
return {"hello": "world"}
The first run fails, since there is no snapshot to compare with yet. Accept the new results to store them as snapshots:
pytest --accept-diff
The snapshots are stored as JSON files in the __pytest_results__ folder, at the root
of your project. Commit this folder: from now on, the test fails whenever its result
changes.
When a test fails, open the differences in your IDE with the --ide option:
pytest --ide vscode
The supported IDEs are cursor, pycharm and vscode.
If the changes are expected, update the snapshots with pytest --accept-diff.
Documentation
- Regression fixture: checking results, supported types, snapshot files and custom formats.
- Configuration: command line options and configuration file.
Metadata
Release files for pytest-results 0.5.2
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 | Actions |
|---|---|---|---|---|
| pytest_results-0.5.2.tar.gz | 9.8 kB | Without provenance | Details for pytest_results-0.5.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pytest_results-0.5.2-py3-none-any.whl | Python 3 | none | any | Details for pytest_results-0.5.2-py3-none-any.whl |
Total release size: 20.6 kB
Release files / pytest_results-0.5.2.tar.gz
| Download URL | pytest_results-0.5.2.tar.gz |
|---|---|
| Size | 9.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
79355c8632d0a9598290b96ddb3817ff8c51b7113b09aa3d334664d104a88e14
|
|
BLAKE2b-256 checksum How to use checksums |
b943a55cc97302dddd4282b19d65b020ff40017565116113fcff800439e7a45d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pytest_results-0.5.2-py3-none-any.whl
| Download URL | pytest_results-0.5.2-py3-none-any.whl |
|---|---|
| Size | 10.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
be4c8b301d1096be64fbd35a42c4db9c3a8104433a3a121941db89ea857e5498
|
|
BLAKE2b-256 checksum How to use checksums |
3e1576f0909923d2c39b99ff3f0c9bcf3fced8de9d16a2712f639e30990c1fd3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for pytest-results 0.5.2
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.