snaptol.plugin.pytest_collection_modifyitems#
- snaptol.plugin.pytest_collection_modifyitems(config, items)[source]#
Modifies the collection of test items based on snapshot update options.
This hook is called after test collection to potentially filter which tests should be executed. When
--snaptol-updateis used, only tests that failed in the previous run are kept for execution. When--snaptol-use-cacheis enabled, tests with cached snapshot data are deselected and their snapshots are written directly from cache without re-running the tests.- Parameters:
config (
Config) – The pytest configuration object containing command line options and cache.items (
list[Item]) – List of collected pytest test items that can be modified in-place.