Metadata-Version: 2.1
Name: pytest-diff-selector
Version: 0.1.3
Summary: Get tests affected by code changes (using git)
Home-page: https://github.com/fruch/pytest-diff-selector
Author: Israel Fruchter
Author-email: israel.fruchter@gmail.com,
License: MIT
Project-URL: Source, https://github.com/fruch/pytest-diff-selector
Project-URL: Tracker, https://github.com/fruch/pytest-diff-selector/issues
Keywords: pytest,git
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Framework :: Pytest
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Testing
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown; charset=UTF-8
Provides-Extra: test
Provides-Extra: all
License-File: LICENSE

# pytest-diff-selector

## Quickstart
```bash
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](https://asciinema.org/a/sKnqi785oLwcezFnMv5klPZVM.svg)](https://asciinema.org/a/sKnqi785oLwcezFnMv5klPZVM)

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


