--- id: pytest-testmon version: "2.2.0" license: MIT license_treatment: permissive maintenance: aging --- # pytest-testmon — selects tests affected by changed files and methods License: permissive · Maintenance: aging · Downloads: 4.8M/mo ## What it is and what it does pytest-testmon is a pytest plugin that tracks dependencies between your code and tests, then uses that information to run only the tests affected by your recent changes. Instead of running your entire test suite after every edit, it builds a dependency database on first run and then intelligently selects which tests to execute based on what code you've modified. The plugin depends on pytest and coverage to work. It's designed for developers who want faster feedback loops during development by skipping tests that cannot possibly be affected by their changes. The approach trades a small upfront cost (building the dependency map) for potentially significant time savings on subsequent runs, especially in large projects. Use it for: - Speed up development feedback by running only tests affected by your current changes instead of the full suite. - Integrate into CI pipelines to reduce test execution time on pull requests with localized code changes. - Validate that refactoring or bug fixes don't break unrelated functionality by confirming only relevant tests are affected. - Reduce developer wait time in large codebases where full test runs take minutes or longer. - Detect unexpected test dependencies by observing which tests are marked as affected by a given code change. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. A pytest plugin that automatically identifies and runs only the tests affected by recent code changes, using dependency tracking to avoid re-running unrelated tests. Yes, if you have a large test suite and want faster development feedback. The low install friction and permissive license make it a low-risk experiment. However, the aging maintenance status (256 days since last release) means you should verify reliability in your codebase before relying on it in critical CI workflows, and be prepared to maintain or fork it if issues arise. ## Install pip install pytest-testmon uv add pytest-testmon poetry add pytest-testmon ## Installing pytest-testmon Before you install: Low friction install with just pytest and coverage as dependencies. Maintenance status is aging—last release was 256 days ago—so updates and bug fixes may be slower than actively maintained alternatives. License in practice: MIT license is permissive, allowing use in both open-source and proprietary projects with minimal restrictions. Quickstart: pip install pytest-testmon # First run: build dependency database pytest --testmon # Subsequent runs: only affected tests execute pytest --testmon Requires Python >=3.10. Verify before relying: - Reliability of affected-test detection in complex codebases with dynamic imports or metaprogramming. - Performance overhead of building and maintaining the dependency database on large test suites. - Compatibility with pytest plugins that modify test collection or execution. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 4.8M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags pytest affected tests, selective test execution, test impact analysis, pytest dependency tracking, incremental test runs, changed code test selection, pytest test filtering, test-optimization, ci-acceleration [View on SkillFed](https://skillfed.io/packages/pytest-testmon) · [View on PyPI](https://pypi.org/project/pytest-testmon/)