Skip to main content

pytest-digline

The digline comparison, as rows in pytest's own report.

pip install pytest-digline
pytest --digline-suite eval/suite.py
digline: comparing 1 suite(s) against the committed baseline

eval/suite.py::alpha::contains          .
eval/suite.py::alpha::llm_rubric        F
eval/suite.py::beta::contains           .
eval/suite.py::gamma                    s

=================================== FAILURES ===================================
digline: alpha · llm_rubric
  Went from passing to failing (0.910000 → 0.640000).
  reason: signed=True, concise=False

==================================== digline ===================================
eval/suite.py: 1 check got worse compared with the reference. Every case could
be judged. 1 case is suspended. The suite is unchanged from the reference.

One row per check — one assertion on one case — because that is digline's unit of verdict. -k and --last-failed select them like any other test.

What it does, and what it costs

By default it compares and never runs: it reads the latest stored run of each suite, holds it against the baseline committed in your repository, and makes no network call at all. Producing a run stays a separate act — digline run, the official image, the GitHub Action.

--digline-run runs each suite first. That calls your provider and spends money, so it is a flag on the command line where the cost is visible, it prints the planned call count before the first call, and it refuses under --collect-only: a command whose job is to list test names must never be able to spend a hundred model calls.

The four states

digline pytest
fine passed
got worse FAILED
could not be judged ERROR — an error is neither green nor a regression
suspended SKIPPED, with the reason the suite declared

The suspension is the one digline state an exit code cannot express: it never fails, so it disappears into 0. pytest has had a state for a decision rather than an outcome since it was written, and this is it.

A session digline did not say green does not end green. When a suite's comparison would make digline compare exit 1 or 2 and the session would otherwise end 0, it ends 1, and the summary says why, one line per suite: eval/suite.py: digline exits 2, so this session does not end green. That covers what fails no row: a pinned file that drifted, and a run that judged nothing because every case it measures is suspended. There is no flag. A status that is already not 0 is left as it is. pytest's own summary line at the bottom can stay green, because it counts the rows' outcomes and not the exit status: read the exit code, and the digline line above it says why.

What a pytest run does not carry, the difference between digline's 1 and 2, is set out once, on the pytest page. A job that needs 1 versus 2 runs digline compare, which is one command away.

What it does carry is a refusal. When digline declines the request — no baseline, a document it refuses, a comparison across tenants or across the projection — the session stops as pytest's usage error, exit 4, and the message names the refusal, as digline compare names it and exits 64. So does a file that cannot be read or written, and a sys.exit() from a target under --digline-run. Anything else nobody anticipated prints its traceback and exits 3, where the command line exits 70, with digline's sentence in place of pytest's INTERNALERROR.

Naming a suite

Nothing is discovered by convention: a suite is a file that executes, and a file found by convention is a file that runs by accident. Name it, either way:

pytest --digline-suite eval/suite.py --digline-suite eval/billing.toml
# pyproject.toml
[tool.pytest.ini_options]
digline_suites = ["eval/suite.py"]

The command line replaces the ini list rather than adding to it, so narrowing a run to one suite is expressible. --digline-root names the perimeter holding .digline/ and defaults to pytest's rootdir.

Select rows with -k; a node id passed as an argument is not supported.

What it will not do

It does not promote. There is no flag, no fixture and no marker that makes a run the new baseline — not refused, absent, and a test in this package sweeps the sources to keep it that way. A baseline is an approved reference; the approval is a person's, and a green pytest run is the single most likely place for a promotion to happen by accident.

It has no thresholds of its own. Every bar it reports against was declared in your suite and frozen in the baseline somebody promoted and committed.

It depends on digline and pytest, and nothing else.

Turn it off for one run with -p no:digline. With no suite named it collects nothing, prints nothing and adds no header.

The reasoning is ADR 0013.

Metadata

Release files for pytest-digline 0.4.0

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-digline 0.4.0
File Size Uploaded Provenance Actions
pytest_digline-0.4.0.tar.gz 48.8 kB With provenance Details for pytest_digline-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pytest-digline 0.4.0
File Interpreter ABI Platform Actions
pytest_digline-0.4.0-py3-none-any.whl Python 3 none any Details for pytest_digline-0.4.0-py3-none-any.whl

Total release size: 68.7 kB

Release files / pytest_digline-0.4.0.tar.gz

Download URL pytest_digline-0.4.0.tar.gz
Size 48.8 kB
Tags Source
SHA-256 checksum
How to use checksums
70720165f6463513d7f8d48683d404429717e2b933cc16088219ec1caf43e33e
BLAKE2b-256 checksum
How to use checksums
1c331d9d89c617e8001cb911a329c465a81069ab300d0d48ba1eb28835b70e0b
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 26, 2026.

Transparency log

Release files / pytest_digline-0.4.0-py3-none-any.whl

Download URL pytest_digline-0.4.0-py3-none-any.whl
Size 19.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a88a188ab960ecf8d6e83ec597ad596b567cbe9ded458d9b0387153e1dbb8b41
BLAKE2b-256 checksum
How to use checksums
40eb31b03447c52d9fd4f99a55b10deeea91ac5d8474a1c2d8908788933fdd0e
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 26, 2026.

Transparency log

Security for pytest-digline 0.4.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pytest_digline-0.4.0.tar.gz

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 26, 2026.

Transparency log

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.

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