ditto prune¶
Removes stale snapshots by running pytest with --ditto-prune. Snapshot files
not accessed during the run are deleted.
Usage¶
Examples¶
Behaviour¶
- Runs pytest with
--ditto-pruneflag - Tracks which snapshot files are accessed during the run
- Deletes any snapshot files that were not accessed
Warning
Using -k for a partial run may falsely classify snapshots for un-run
tests as unused. Only use prune with a full test run to avoid accidental
deletion.