pytest-expected
This pytest fixture lets you write tests that compare to a previously known, recorded value:
def test_something(expected):
assert something(frobnicate=True) == expected
When called with --record, pytest will accept any value and store it in a
file in the hidden .expected directory under the pytest root folder (usually
the repository root).
When called without --record, it will load the known value(s) from that
store, and assert that they are equal to the observed values.
Any picklable value can be stored.
You can also use expected several times in a test for different values, and
it'll figure out the rest.
pytest-expected organizes storage based on:
- Test ID (typically includes path to test file, test name, and parametrizations)
- Number of uses of
expected
Metadata
Release files for pytest-expected 0.1.1
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_expected-0.1.1.tar.gz | 2.6 kB | Without provenance | Details for pytest_expected-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pytest_expected-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for pytest_expected-0.1.1-py3-none-any.whl |
Total release size: 5.6 kB
Release files / pytest_expected-0.1.1.tar.gz
| Download URL | pytest_expected-0.1.1.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ab8529d2ab660c4ea5ed0897596e56dc15dada064af0df96b2047640186e9890
|
|
BLAKE2b-256 checksum How to use checksums |
2c7616d36c5c0337000cd65c18ce46be2db8ca5745f5c2099b72dea2433ed8b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.3
|
Release files / pytest_expected-0.1.1-py3-none-any.whl
| Download URL | pytest_expected-0.1.1-py3-none-any.whl |
|---|---|
| Size | 2.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
29cac09773ba5b259341d382ade8bf61ab8052408c8a440fdb4e9630a9632605
|
|
BLAKE2b-256 checksum How to use checksums |
0fb4e8bce23fc83431a05ff0bed6594ae5f450df625bca9f99a00ac23ce57a35
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.3
|
Security for pytest-expected 0.1.1
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.