pytest-ditto-pickle
A pytest-ditto plugin 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, 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
pytest-ditto 2.0 doesn't find snapshots recorded by 1.x, including .pkl
files: re-record them with this recorder. See the documentation.
Metadata
Release files for pytest-ditto-pickle 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 | |
|---|---|---|---|
| pytest_ditto_pickle-2.0.0.tar.gz | 3.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytest_ditto_pickle-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.3 kB
Release files / pytest_ditto_pickle-2.0.0.tar.gz
| Download URL | pytest_ditto_pickle-2.0.0.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d704ce8f8609d6304feb1a255da33578bedaaf674fd58bb73652b69d9cbe5fd1
|
|
BLAKE2b-256 checksum How to use checksums |
8b1b2e10755f05aa9e1e79ea3f792ba4f50b5cbb256f9da852cd2693d6d4c6f3
|
| 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_pickle-2.0.0-py3-none-any.whl
| Download URL | pytest_ditto_pickle-2.0.0-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
746f962d30bf9301ecb2e6e704e1414426ac329f9ba6291e169a1aea9e8a65a6
|
|
BLAKE2b-256 checksum How to use checksums |
48f52246566e93b913228d7575776b7e6866e885ca5b21a94b3e9dd7d058e888
|
| 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