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.0rc1
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.0rc1.tar.gz | 3.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytest_ditto_pickle-2.0.0rc1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.6 kB
Release files / pytest_ditto_pickle-2.0.0rc1.tar.gz
| Download URL | pytest_ditto_pickle-2.0.0rc1.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f61416001e0e73beeb5df457ece792b4e0d78300aee46186b945833ce95587ae
|
|
BLAKE2b-256 checksum How to use checksums |
faad39ad5bf89d4cc0378bfcbd56fc29cb097c138e2aa61682570644070bc32e
|
| 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 logRelease files / pytest_ditto_pickle-2.0.0rc1-py3-none-any.whl
| Download URL | pytest_ditto_pickle-2.0.0rc1-py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1afdd0f529a6b9c04894cac1e1645fe707cbe18613b7dbf9939cc72da6f68071
|
|
BLAKE2b-256 checksum How to use checksums |
cd7bf78a8a44f0e20f122d98e82f3127ae3dff9569c9102e8a644aad82c83281
|
| 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