pytest-testmon
selects tests affected by changed files and methods
Decision gist · record as of 2026-08-14
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.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python >=3.10.
- 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 · maintenance · safety
MIT (permissive) — MIT license is permissive, allowing use in both open-source and proprietary projects with minimal restrictions.
last release 2025-12-01 (256 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 4,761,816 downloads/mo, #2,238 on PyPI
Alternatives
Verify before relying
pip install pytest-testmon
# First run: build dependency database
pytest --testmon
# Subsequent runs: only affected tests execute
pytest --testmon- 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.
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 on this page. Verify before relying on it.
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
pytest-testmon on PyPI
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.
Requires Python >=3.10.
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
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 the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagespytestcoverage |
| Maintenance | Aging 256 days since the last release |
| First released | |
| Downloads | 4,761,816 / month, #2,238 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaFramework :: PytestIntended Audience :: DevelopersOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: PythonTopic :: Software Development :: LibrariesTopic :: Software Development :: TestingTopic :: Utilities |
Evidence: pytest_testmon-2.2.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “pytest affected tests”
- pytest-testmonA pytest plugin that automatically identifies and runs only the tests…
- pytest-cagouleA pytest plugin that identifies which tests exercise code you've…
- pytest-snobA pytest plugin that selects and runs only the tests affected by…
Give your agent the search over MCP, or paste the wish link into any chat.
More Libraries packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.
Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
See also pytest-incremental · pytest-snob · pytest-skip-slow · snob-lib · pytest-memray · pytest-filter-subpackage · pytest-cache · pytest-cagoule · pytest-picked · pytest-json-report