snob-lib
A tool that only selects meaningful python tests to run.
What it is and what it does
Snob is a test selection tool that analyzes your Python project's static import dependencies to determine which tests are affected by code changes. Rather than running your entire test suite on every change, it builds a dependency graph and outputs only the tests impacted by modified files, dramatically reducing feedback time during development.
The tool works as both a standalone CLI (piped with git diff and pytest) and as a pytest plugin. It's designed for local development workflows in large codebases where full regression testing would be prohibitively slow. Snob does not predict test failures—it selects tests based on static dependency analysis—and is explicitly not intended to replace CI or full test suite runs, but to accelerate the inner development loop by often skipping 99% of irrelevant tests.
Use it for:
- Speed up local development by running only tests affected by your current code changes instead of the full suite.
- Reduce CI feedback time by using Snob to filter test runs to changed modules in pull request pipelines.
- Identify test coverage gaps by visualizing the dependency graph between code and tests using Graphviz output.
- Exclude slow integration tests or external API tests from automatic runs while keeping them available for manual execution.
- Ensure critical tests always run by marking files like conftest.py or requirements.txt to trigger full test suite on change.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Snob analyzes your Python project's dependency graph to intelligently select which tests to run based on code changes, reducing test suite execution time by skipping unaffected tests.
Yes, if you work in a large Python codebase where full test suite runs are slow and you want faster local feedback during development. The tool is actively maintained, has no runtime dependencies, and carries permissive licensing. The caveat: wheel availability only for Python 3.10+ may limit adoption on older projects despite the >=3.8 requirement claim, and static analysis cannot catch dynamic imports or runtime side-effects, so it should complement rather than replace CI regression testing.
Install
snob-lib on PyPI
pip
pip install snob-libuv
uv add snob-libpoetry
poetry add snob-libInstalling snob-lib
Before you install
Medium install friction due to compiled wheels across multiple platforms and Python versions (3.10, 3.11). Package is actively maintained with recent activity, though only a single release so far. No runtime dependencies simplifies deployment.
License in practice
MIT license is permissive and imposes no restrictions on use, modification, or distribution in proprietary or open-source projects.
Quickstart
pip install snob-lib
# As CLI: list affected tests based on git changes
snob $(git diff --name-only) | xargs pytest
# Or as pytest plugin: test changes since a commit
pytest --commit-range main..HEAD
Requires Python >=3.8 and Git for change detection; pytest plugin mode requires pytest to be installed separately.
Verify before relying
- Whether the package works with Python versions below 3.10 despite claiming >=3.8 support (wheels only provided for 3.10 and 3.11).
- Performance characteristics on codebases smaller than the 'million line' example mentioned in the description.
- Accuracy of test selection when projects use dynamic imports or runtime side-effects beyond static analysis.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 580 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 94,273/month — #13,335 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: snob_lib-0.1.0-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.whl; snob_lib-0.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; snob_lib-0.1.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl; snob_lib-0.1.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl; snob_lib-0.1.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl; snob_lib-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; snob_lib-0.1.0-cp310-cp310-musllinux_1_2_aarch64.whl; snob_lib-0.1.0-cp310-cp310-musllinux_1_2_armv7l.whl; snob_lib-0.1.0-cp310-cp310-musllinux_1_2_i686.whl; snob_lib-0.1.0-cp310-cp310-musllinux_1_2_x86_64.whl; snob_lib-0.1.0-cp310-cp310-win32.whl; snob_lib-0.1.0-cp310-cp310-win_amd64.whl; snob_lib-0.1.0-cp311-cp311-macosx_10_12_x86_64.whl; snob_lib-0.1.0-cp311-cp311-macosx_11_0_arm64.whl; snob_lib-0.1.0-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.whl; snob_lib-0.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; snob_lib-0.1.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl; snob_lib-0.1.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl; snob_lib-0.1.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl; snob_lib-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Keywords: snob, pytest, testing, rust, rts, maturin, pyo3
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-incrementalpytest-incremental is a pytest plugin that…
permissive · top 15,000 on PyPI
pytest-cagouleA pytest plugin that identifies which tests…
permissive · top 15,000 on PyPI
pytest-testmonA pytest plugin that automatically identifies…
permissive · top 5,000 on PyPI
rtestA Python test runner built in Rust that uses…
permissive · top 15,000 on PyPI
pytest-deepassertA pytest plugin that replaces standard…
permissive · top 15,000 on PyPI
pytest-dependencyA pytest plugin that marks tests as dependent…
permissive · top 5,000 on PyPI
pip-check-reqsAudits Python project imports against…
permissive · top 15,000 on PyPI
pytest-beartype-testsA pytest plugin that automatically applies…
permissive · top 15,000 on PyPI
pytest-skip-slowA pytest plugin that skips tests marked with…
permissive · top 15,000 on PyPI