Skip to main content
Pre-release

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

pytest-ditto-pickle

Extension plugin for pytest-ditto that records snapshots with Python's pickle.

pytest-ditto records snapshots as strict JSON by default. Use pickle only when a value can't be represented in JSON, or YAML, or one of the other recorders, and you accept the risk above.

Installation

pip install pytest-ditto-pickle

pytest-ditto has no pickle extra: install this package by name, deliberately.

Usage

Select the recorder explicitly on each test, with @ditto.pickle or its long form, @ditto.record("pickle"):

import datetime

import ditto


@ditto.pickle
def test_schedule(snapshot):
    schedule = {"days": {"mon", "wed"}, "start": datetime.time(9, 30)}
    assert snapshot(schedule, key="schedule") == schedule

Snapshots from pytest-ditto 1.x

pytest-ditto 1.x used pickle by default and saved snapshots with the .pkl extension. This recorder reads and writes the same file format, so a 1.x snapshot's contents load unchanged.

pytest-ditto 2.0 names snapshot files differently, though, so 2.0 won't find a 1.x file where 1.x left it. Rename each file to its 2.0 key, which ends in .pickle (the recorder's name) instead of .pkl. See the pytest-ditto upgrade guide for the new names.

Metadata

Release files for pytest-ditto-pickle 2.0.0rc2

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-pickle 2.0.0rc2
File Size Uploaded
pytest_ditto_pickle-2.0.0rc2.tar.gz 3.9 kB Details

Built distribution (wheel)

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

Total release size: 7.6 kB

Release files / pytest_ditto_pickle-2.0.0rc2.tar.gz

Download URL pytest_ditto_pickle-2.0.0rc2.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
93fd1cba55a16821dd5cae205afb74e6bcf7dfbc66a4246aca8bbc1b71101a54
BLAKE2b-256 checksum
How to use checksums
b8336211280f55c5068558bc511de3ddbc5a9d4d82cfb73d5aa4de7fbaee66b9
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 log

Release files / pytest_ditto_pickle-2.0.0rc2-py3-none-any.whl

Download URL pytest_ditto_pickle-2.0.0rc2-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
08f8d72812474c0a9f5746671599401981d88f5a17fd8370dcf8a3f517a53137
BLAKE2b-256 checksum
How to use checksums
c4fbca7d3d7213efbf6094373449cc8751b015f50afb08a74bd3be5fb5f460eb
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 log
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