Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

pytest-ditto-pyarrow

Extension plugin for pytest-ditto for pyarrow table snapshots.

Use the following marks for their associated recorder:

  • @ditto.pyarrow.parquet
  • @ditto.pyarrow.feather
  • @ditto.pyarrow.csv

Installation

pip install pytest-ditto[pyarrow]

Usage

The following test example tests the result of fn hasn't changed by comparing against a saved snapshot of the result. This snapshot is taken the first time the test is run; hence, the initial run is not a proper test run. Subsequent test runs are compared against the saved result.

  • The fixture, table is a pyarrow.Table and is the argument to the function under test, fn.
  • fn transforms the data and the test asserts the result of this function in unchanged compared to the initial, hopefully validated, result.
  • The output format of the snapshot is parquet as defined by the @ditto.pyarrow.parquet mark.
import pyarrow as pa
import pyarrow.compute as pc
import ditto
import pytest


@pytest.fixture
def table() -> pa.Table:
    return pa.table(
        [
            [1, 2, 3, 4],
            [4.5, 5.2, 6.8, 3.5],
            [7, 8.5, None, None],
            [True, False, True, True],
            ["a", "b", "c", "x"],
        ],
        names=list("abcde"),
    )


def fn(x: pa.Table):
    even_filter = pc.bit_wise_and(pc.field("a"), pc.scalar(1)) == pc.scalar(0)
    return x.filter(even_filter)


@ditto.pyarrow.parquet
def test_fn_with_pyarrow_parquet_snapshot(snapshot, table):
    result = fn(table)
    assert result.equals(snapshot(result, key="filtered"))

Metadata

Release files for pytest-ditto-pyarrow 2.0.0rc1

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-ditto-pyarrow 2.0.0rc1
File Size Uploaded
pytest_ditto_pyarrow-2.0.0rc1.tar.gz 4.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytest-ditto-pyarrow 2.0.0rc1
File Interpreter ABI Platform
pytest_ditto_pyarrow-2.0.0rc1-py3-none-any.whl Python 3 none any Details

Total release size: 7.9 kB

Release files / pytest_ditto_pyarrow-2.0.0rc1.tar.gz

Download URL pytest_ditto_pyarrow-2.0.0rc1.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
236b6c4bbad05a70f22439c162007b4b109c14a5c7c268a2083f74ff82518ac2
BLAKE2b-256 checksum
How to use checksums
423123e2a565c4c72f64f19d36a29b87d42061fc3e3ee66b6752a0fd9abfbae8
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 Sep 30, 2026.

Transparency log

Release files / pytest_ditto_pyarrow-2.0.0rc1-py3-none-any.whl

Download URL pytest_ditto_pyarrow-2.0.0rc1-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8d80ee109d36a06823f6c9998f8ebd3cb297973b01af7524c0e0a9d64f1ceffc
BLAKE2b-256 checksum
How to use checksums
01f60cb2865c745ef1ea8befee1a1e758f40396de345557b8e96dff6e133fed5
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 Sep 30, 2026.

Transparency log

Release history Release notifications | RSS feed

2.0.0

2 release files

This release

2.0.0rc1 This release

2 release files

0.1.2

2 release files

0.1.0

2 release files

0.0.1

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