pytest-picked
Run the tests related to the changed files
What it is and what it does
pytest-picked is a pytest plugin that integrates with Git to automatically discover and run only the tests affected by your uncommitted changes or commits on the current branch. Instead of manually specifying which tests to run, you invoke `pytest --picked` and the plugin reads `git status` to identify modified test files and folders, then runs only those tests—or optionally runs changed tests first followed by the full suite.
The plugin supports two modes: unstaged (default), which runs tests from files with uncommitted changes, and branch mode, which runs tests from files changed relative to a parent branch (typically main or dev). It's designed for developers working in feature branches or with uncommitted work who want fast feedback without copying and pasting test paths.
Use it for:
- Run only tests affected by your current work during active development to get quick feedback.
- Run modified tests first in CI pipelines before running the full suite to fail fast on breaking changes.
- Verify that changes to a feature branch don't break tests specific to that branch without running the entire test suite.
- Integrate into pre-commit hooks to run only relevant tests before committing code.
- Speed up local test cycles when working on large projects with many test files.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A pytest plugin that automatically runs only the tests related to unstaged files or commits on the current Git branch, eliminating the need to manually select which tests to run.
Yes, if you work in Git-based projects and want to reduce test cycle time during development. The plugin is stable, has no security vulnerabilities, and adds minimal overhead. The dormant maintenance status is not a blocker since the plugin's scope is narrow and it relies on stable pytest and Git APIs. Install it if selective test running fits your workflow.
Install
pytest-picked on PyPI
pip
pip install pytest-pickeduv
uv add pytest-pickedpoetry
poetry add pytest-pickedInstalling pytest-picked
Before you install
Low friction: pure Python wheel with only pytest as a runtime dependency. Maintenance is dormant (646 days since last release), though the package remains functional and supports current Python versions.
License in practice
MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions.
Quickstart
pip install pytest-picked
pytest --picked
Requires a Git repository; the plugin reads git status to identify changed files.
Verify before relying
- Whether the plugin correctly handles edge cases like renamed files, deleted files, or merge conflicts.
- Performance impact when running against large test suites with many changed files.
- Compatibility with other pytest plugins that also modify test collection.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — pytest |
| Maintenance | dormant — 646 days since the last release |
| First released | |
| Downloads | 818,607/month — #4,980 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pytest_picked-0.5.1-py3-none-any.whl
Keywords: pytest, testing, changed files, selective tests
Tags
More Testing packages
Pluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
virtualenvvirtualenv creates isolated Python environments…
permissive · top 100 on PyPI
coverageCoverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
pytest-asynciopytest-asyncio is a pytest plugin that enables…
permissive · top 1,000 on PyPI
pytest-json-ctrfA pytest plugin that generates test reports in…
permissive · top 1,000 on PyPI
pytest-snobA pytest plugin that selects and runs only the…
permissive · top 15,000 on PyPI
pytest-skip-slowA pytest plugin that skips tests marked with…
permissive · top 15,000 on PyPI
pytest-onlyA pytest plugin that runs only tests marked…
permissive · top 15,000 on PyPI
pytest-custom-exit-codeA pytest plugin that lets you customize the…
permissive · top 5,000 on PyPI
pytest-isortA pytest plugin that automatically checks…
permissive · top 15,000 on PyPI
pytest-incrementalpytest-incremental is a pytest plugin that…
permissive · top 15,000 on PyPI
pytest-error-for-skipsA pytest plugin that converts skipped tests…
permissive · top 15,000 on PyPI
pytest-watchRuns pytest continuously, re-executing tests…
permissive · top 5,000 on PyPI
pytest-loggingA pytest plugin that configures Python logging…
permissive · top 15,000 on PyPI
diff-coverCompares test coverage reports against git…
permissive · top 1,000 on PyPI