--- id: pytest-cache version: "1.0" license: MIT License license_treatment: permissive maintenance: abandoned --- # pytest-cache — pytest plugin with mechanisms for caching across test runs License: permissive · Maintenance: abandoned · Downloads: 687.7K/mo ## What it is and what it does pytest-cache is a pytest plugin that stores test execution state between runs, allowing developers to selectively rerun failed tests or prioritize failures in subsequent test sessions. It exposes a config.cache object that plugins and conftest code can use to persist arbitrary values across test invocations—useful for caching expensive computations or tracking test history. However, this package is abandoned (last updated 2013-06-04) and its core functionality has been integrated directly into pytest itself. Modern pytest versions provide native cache support without requiring this external plugin. Installing this package on a current pytest setup risks API incompatibilities and maintenance gaps. Use it for: - Rerun only the tests that failed in the previous test session using --lf to speed up debugging cycles. - Run all tests but execute previously failed tests first using --ff to surface regressions early. - Cache expensive setup computations across multiple test runs via config.cache.set() and config.cache.get(). - Inspect cached test state and values using --cache to diagnose test history and cross-run dependencies. - Clear all cached state before CI runs using --clearcache to ensure test isolation and correctness. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. A pytest plugin that persists test state across runs, enabling rerun of only failed tests or failures-first execution via --lf and --ff flags, and providing a config.cache object for plugins to share values between test invocations. No. This package is abandoned (last release 2013-06-04) and its functionality is now built into pytest natively. Installing it risks incompatibility with modern pytest versions and introduces unmaintained code into your test infrastructure. Use pytest's native cache support instead. ## Install pip install pytest-cache uv add pytest-cache poetry add pytest-cache ## Installing pytest-cache Before you install: High install friction: the package is abandoned (last release 2013-06-04) with no maintenance signal. Modern pytest versions have integrated this functionality natively, making this package obsolete for current projects. License in practice: MIT License (permissive) poses no legal barrier to use, but the abandoned status and age make licensing a secondary concern compared to functionality gaps. Quickstart: pip install pytest-cache # Then in conftest.py or a plugin: def pytest_funcarg__mydata(request): val = request.config.cache.get("example/value", None) if val is None: val = 42 request.config.cache.set("example/value", val) return val This package is abandoned and may be incompatible with modern pytest versions; native cache functionality is now integrated into pytest itself. Verify before relying: - Compatibility with pytest versions released after 2013-06-04; whether API changes in modern pytest break this plugin. - Whether the --lf and --ff flags still work as documented or have been superseded by pytest's native implementation. - Current usability on Python 3 versions, given the package's alpha status and age. ## Package facts - License: MIT License (permissive) - Python support: unspecified - Install friction: high - Maintenance: abandoned - Downloads: 687.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags pytest cache plugin, rerun failed tests, pytest state persistence, cross-testrun caching, pytest failure tracking, test result caching, pytest --lf --ff, deprecated, legacy [View on SkillFed](https://skillfed.io/packages/pytest-cache) · [View on PyPI](https://pypi.org/project/pytest-cache/)