pytest-ditto-polars
A pytest-ditto plugin for polars DataFrame snapshots.
Installation
pip install "pytest-ditto[polars]"
Marks
@ditto.polars.parquet@ditto.polars.ipc@ditto.polars.csv@ditto.polars.ndjson
Each mark is shorthand for @ditto.record("<name>").
Use @ditto.polars.parquet or @ditto.polars.ipc: CSV and NDJSON infer
types again on load. See the format notes in the documentation.
Usage
import polars as pl
import polars.testing
import ditto
def awesome_fn_to_test(df: pl.DataFrame) -> pl.DataFrame:
return df.with_columns(pl.col("a") * 2)
# The following test uses polars.DataFrame.write_parquet to write the data snapshot
# to the `.ditto` directory with filename:
# `<module>.test_fn_with_parquet_dataframe_snapshot@ab_dataframe~<hash>.polars.parquet`.
@ditto.polars.parquet
def test_fn_with_parquet_dataframe_snapshot(snapshot):
input_data = pl.DataFrame({"a": [1, 2, 3], "b": [4, 5, 9]})
result = awesome_fn_to_test(input_data)
pl.testing.assert_frame_equal(result, snapshot(result, key="ab_dataframe"))
Metadata
Release files for pytest-ditto-polars 2.0.0
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_ditto_polars-2.0.0.tar.gz | 3.8 kB | With provenance | Details for pytest_ditto_polars-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pytest_ditto_polars-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for pytest_ditto_polars-2.0.0-py3-none-any.whl |
Total release size: 7.5 kB
Release files / pytest_ditto_polars-2.0.0.tar.gz
| Download URL | pytest_ditto_polars-2.0.0.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fbc6e8825055efb9aaacffdc6c452371f58ce4f162470abd95c079483929f43a
|
|
BLAKE2b-256 checksum How to use checksums |
cf0f34d9008b6118bb3327821b2257caa4e3f57e56d7454892c99e6f20ea6135
|
| 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 7, 2026.
Transparency logRelease files / pytest_ditto_polars-2.0.0-py3-none-any.whl
| Download URL | pytest_ditto_polars-2.0.0-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d98c7fb404b7cd4c0881244b0f3ddc4a7d7a0fc18a87a714c9b8c2817e6e4a2f
|
|
BLAKE2b-256 checksum How to use checksums |
4dcb1c10fe81172f2aec46d3a00e55efed03d4c3a109198c501763515ce2558a
|
| 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 7, 2026.
Transparency logSecurity for pytest-ditto-polars 2.0.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.
Attestation for pytest_ditto_polars-2.0.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 7, 2026.
Transparency logA 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.