skillfed

pytest-picked

Run the tests related to the changed files

pytest-picked v0.5.1 818.6K downloads/30d#4,980 on PyPI
Permissive license MIT DORMANT released

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-picked

uv

uv add pytest-picked

poetry

poetry add pytest-picked

Installing 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

Framework :: PytestIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Testing

Tags

pytest run changed filesselective test execution gitpytest plugin git integrationrun tests for modified filespytest unstaged filesgit-aware test runner
git-integrationtest-selection

More Testing packages