pytest-probatio
Use a probatio schema as a pytest assertion
matcher. A schema reads as the expected shape, and a mismatch is explained by
probatio's path-precise errors instead of a bare assert.
from pytest_probatio import Exact, Partial
from probatio import Port
def test_response(response):
# Exact: extra keys make it unequal.
assert response == Exact({"name": str, "port": Port()})
# Partial: extra keys are allowed.
assert response == Partial({"name": str})
assert Exact({"name": str}) <= response
When the data does not match, the failure lists each error by its path:
data does not match the probatio schema (==):
port: expected a port number between 1 and 65535
Install it alongside pytest; the plugin registers itself:
pip install pytest-probatio
This package lives in the probatio monorepo but ships separately, so the core
probatio library stays dependency-free.
The full guide, including schema reuse across tests and the raises helper,
lives at
probatio.frenck.dev.
Metadata
Release files for pytest-probatio 0.11.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 | |
|---|---|---|---|
| pytest_probatio-0.11.2.tar.gz | 6.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytest_probatio-0.11.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.0 kB
Release files / pytest_probatio-0.11.2.tar.gz
| Download URL | pytest_probatio-0.11.2.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cf0f2feb25f316a69db31ece9a4111f3a3195747e92dcb2a3f838e1f323671fe
|
|
BLAKE2b-256 checksum How to use checksums |
c5381f71adb29b706fff680f47e583f770c5cbbf8365d60fbfa9818943e8afe5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.
Transparency logRelease files / pytest_probatio-0.11.2-py3-none-any.whl
| Download URL | pytest_probatio-0.11.2-py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
91086e5fd49a3bb7710f181cd9f48d71bdb0096f7963f50fe25762ef5c6b503b
|
|
BLAKE2b-256 checksum How to use checksums |
f862ecd7b0bc452da9b80cfca6cee17ab09c31d5b64724f3c928b8a63f6c54fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.
Transparency log