snaptol.plugin.pytest_sessionfinish

snaptol.plugin.pytest_sessionfinish#

snaptol.plugin.pytest_sessionfinish(session)[source]#

Runs after all tests are completed. When the --snaptol-update option is enabled, it scans through all test items (including deselected ones) to identify relevant snapshot files. Any snapshot file that is not associated with an existing test using the snaptolshot fixture will be deleted, ensuring only active snapshots are maintained.

Parameters:

session (Session) – The pytest session object containing test execution information.