{"categories":[{"label":"Testing","url":"https://skillfed.io/packages/category/software-development-testing/6"}],"enrichment":{"capability":"A pytest plugin that selects and runs only the tests affected by changes in a given commit range, using static dependency analysis to avoid unnecessary test execution.","skillfed_tags":["test-optimization","ci-acceleration","rust-extension"],"use_cases":["Speed up CI pipelines by running only tests affected by pull request changes instead of the full suite.","Reduce local development feedback time by running only tests impacted by your uncommitted changes.","Validate that a hotfix to a single module doesn't break dependent code without re-running unrelated tests.","Optimize resource usage in resource-constrained CI environments by skipping unnecessary test execution.","Implement regression test selection in large monorepos where full test runs are prohibitively slow."],"what_it_does":"pytest-snob is a pytest plugin that integrates the snob static analysis library to filter which tests run based on the files changed in a commit range. Instead of running your entire test suite on every CI run, it analyzes your Python codebase's dependency graph to determine which tests could be affected by the changes, then runs only those. This saves time and resources by avoiding redundant test execution.\n\nThe plugin wraps snob, a Rust library compiled to Python via PyO3 and Maturin, which efficiently parses your project's import structure and tracks which modules depend on which files. You invoke it by passing commit ranges to pytest (e.g., `--commits origin/main..HEAD`), and it automatically selects the relevant test subset. It requires Python 3.9 or later and depends on pytest and snob_lib at runtime.","worth_installing":"Yes, if you have a substantial test suite and want to reduce CI time. The plugin is actively maintained, has no known vulnerabilities, installs with low friction, and solves a real problem\u2014unnecessary test execution. The main caveat is ensuring snob_lib wheels are available for your platform; verify that before committing to it in your pipeline."},"id":"pytest-snob","links":{"html":"https://skillfed.io/packages/pytest-snob","md":"https://skillfed.io/packages/pytest-snob.md","pypi":"https://pypi.org/project/pytest-snob/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2025-01-12","license_spdx":null,"license_treatment":"permissive","name":"pytest-snob","python_support":"supports_current","summary":"A pytest plugin that only selects meaningful python tests to run."},"popularity":{"monthly_downloads":92881,"position":13416,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.1.14"}
