ditto run¶
Run pytest, passing every argument through to it.
This is the same as running pytest directly: ditto's pytest plugin prints the snapshot report at the end of every run.
Usage:
Options:
Examples¶
# Run all tests
ditto run
# Run specific directory
ditto run tests/ci/
# Run with filter
ditto run tests/ci/ -k test_foo
Behaviour¶
- Forwards all arguments to
pytestand exits with its status - After the run, the ditto session report counts the snapshots created,
rewritten and not written (its backend write raised), then lists each one by
key and recorder under its test file and test. It also says whether
ditto.lockwas written (entries added and removed), refused or failed. Runningpytestdirectly prints the same report. Under--ditto-pruneit also lists each snapshot pruned or not pruned; under--ditto-prune-dry-run, each it would prune. A run that changed nothing prints no report, and neither does a run under pytest-xdist distribution (-n), whose controller runs no tests. Whenditto lockreplaces aditto.lockit couldn't read, the report says the previous entries are unknown rather than counting them.