Skip to main content

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.12.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytest-probatio 0.12.5
File Size Uploaded
pytest_probatio-0.12.5.tar.gz 6.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytest-probatio 0.12.5
File Interpreter ABI Platform
pytest_probatio-0.12.5-py3-none-any.whl Python 3 none any Details

Total release size: 11.9 kB

Release files / pytest_probatio-0.12.5.tar.gz

Download URL pytest_probatio-0.12.5.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
90b01bf09cc891c7139d3b46670f7c1b7ee2a446578d0024e3c701c10e8a1cab
BLAKE2b-256 checksum
How to use checksums
3b815dd0f4c3062ce56d25a236333ecba96a91c7ef284a605bea161563c4ba03
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 Oct 1, 2026.

Transparency log

Release files / pytest_probatio-0.12.5-py3-none-any.whl

Download URL pytest_probatio-0.12.5-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8d5e5da388d3eec81e8c0109c27be3a2fe388ddecf4f4be76e691439f112f292
BLAKE2b-256 checksum
How to use checksums
2bf85e1dce61eba9cce7af1b474cf76b3883cf607a57557fb669224c43590838
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 Oct 1, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.12.5 This release

2 release files

0.12.4

2 release files

0.12.3

2 release files

0.12.2

2 release files

0.12.1

2 release files

0.12.0

2 release files

0.11.4

2 release files

0.11.3

2 release files

0.11.2

2 release files

0.11.1

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page