{"library":"pytest-picked","title":"pytest-picked","description":"pytest-picked is a pytest plugin (version 0.5.1) that enhances test execution by allowing users to run only the tests related to files changed according to Git. It's currently active and maintained, with releases on PyPI. This helps developers quickly test relevant code without running the entire test suite, particularly useful in continuous integration or local development workflows.","language":"python","status":"active","last_verified":"Sat May 16","install":{"commands":["pip install pytest-picked"],"cli":{"name":"pytest","version":"pytest 9.0.3"}},"imports":["Functionality is exposed via the pytest command-line, e.g., 'pytest --picked'. No direct Python imports are typically used by end-users."],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"# 1. Install pytest-picked\n# pip install pytest-picked\n\n# 2. Create a test file (e.g., test_example.py)\n# def test_addition():\n#     assert 1 + 1 == 2\n#\n# def test_subtraction():\n#     assert 2 - 1 == 1\n\n# 3. Modify a test file (e.g., add a new test or change an existing one) and do not commit it.\n# For example, add the following to test_example.py:\n# def test_multiplication():\n#     assert 2 * 3 == 6\n\n# 4. Run pytest-picked to execute only the tests related to changed files\n# Navigate to your project's root directory in the terminal\n# Assuming test_example.py has unstaged changes:\n# pytest --picked\n\n# Example to run tests from modified files first, then all others:\n# pytest --picked=first\n\n# Example to run tests based on changes in the current branch compared to 'main':\n# pytest --picked --mode=branch --parent-branch=main","lang":"bash","description":"After installation, `pytest-picked` integrates with the `pytest` command. You run tests by invoking `pytest` with the `--picked` flag. By default, it runs tests from files with unstaged changes. You can specify different modes (e.g., `--mode=branch`) and a parent branch (`--parent-branch`) for more advanced selection based on Git history.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-16","installed_version":"0.5.1","pypi_latest":"0.5.1","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":100,"avg_install_s":2.6,"avg_import_s":null,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"pytest-picked","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"30.7M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"pytest-picked","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":2.5,"import_time_s":null,"mem_mb":null,"disk_size":"31M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"pytest-picked","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"33.6M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"pytest-picked","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":2.5,"import_time_s":null,"mem_mb":null,"disk_size":"34M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"pytest-picked","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"25.2M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"pytest-picked","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":2.4,"import_time_s":null,"mem_mb":null,"disk_size":"26M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"pytest-picked","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"25.0M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"pytest-picked","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":2.4,"import_time_s":null,"mem_mb":null,"disk_size":"25M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"pytest-picked","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"30.0M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"pytest-picked","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":3,"import_time_s":null,"mem_mb":null,"disk_size":"30M"}]}}