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
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for pytest-diff-selector-0.1.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6bf25dd845c9cee07ff8329341d5115f27c5d0ce4d3a9b5cd341feb2713a12ee |
|
MD5 | 9af8af3e31bc42aaf9e74f5676b46b1c |
|
BLAKE2b-256 | d30557d86ed52dac1f58ab504da7c4860a2b63674fc557591a9c6a82a347a396 |
Close
Hashes for pytest_diff_selector-0.1.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d3807737106c060796fe7d2bfd9b1832f9e8871444043c7e3895bed9416cb66 |
|
MD5 | ca11caf90147318fb9f9fa6cad160f31 |
|
BLAKE2b-256 | 337a3178c43da5845c38914c6dbc114c1dbbf3b825138680445c1b19af81d627 |