skillfed

snob-lib

A tool that only selects meaningful python tests to run.

snob-lib v0.1.0 94.3K downloads/30d#13,335 on PyPI69
Permissive license MIT Active released

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

uv

uv add snob-lib

poetry

poetry add snob-lib

Installing 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

Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyProgramming Language :: Rust

Tags

selective test runnertest impact analysisdependency graph testingskip irrelevant testspytest test selectioncode change test mappingintelligent test filtering
test-selectionrust-compiledpytest-plugin

More Testing packages