Skip to main content

Get tests affected by code changes (using git)

Project description

pytest-diff-selector

Quickstart

pip install pytest-diff-selector

cd [git-project-you-want-scanning]
selector HEAD^  # scan last commit
tests/test_something.py::test_01

selector HEAD   # scan unstaged/uncommited work
tests/test_something.py::test_01

asciicast

Why

When having a long integration tests you want your CI extra smarter and don't waste time on irrelevant tests

How

Figuring out which tests are affect by specific code changes It's scanning all the project python files and build a call graph using AST, and scans this graph to find paths that are part to the change (by line numbers from the diff) that leads to a test

Currently it's only a commandline tool, but it should become a full fledged pytest plugin

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest-diff-selector-0.1.3.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

pytest_diff_selector-0.1.3-py2.py3-none-any.whl (5.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pytest-diff-selector-0.1.3.tar.gz.

File metadata

  • Download URL: pytest-diff-selector-0.1.3.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.1

File hashes

Hashes for pytest-diff-selector-0.1.3.tar.gz
Algorithm Hash digest
SHA256 6bf25dd845c9cee07ff8329341d5115f27c5d0ce4d3a9b5cd341feb2713a12ee
MD5 9af8af3e31bc42aaf9e74f5676b46b1c
BLAKE2b-256 d30557d86ed52dac1f58ab504da7c4860a2b63674fc557591a9c6a82a347a396

See more details on using hashes here.

File details

Details for the file pytest_diff_selector-0.1.3-py2.py3-none-any.whl.

File metadata

  • Download URL: pytest_diff_selector-0.1.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.1

File hashes

Hashes for pytest_diff_selector-0.1.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 6d3807737106c060796fe7d2bfd9b1832f9e8871444043c7e3895bed9416cb66
MD5 ca11caf90147318fb9f9fa6cad160f31
BLAKE2b-256 337a3178c43da5845c38914c6dbc114c1dbbf3b825138680445c1b19af81d627

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page