Skip to main content

Running pytest on modified files

today-i-learned
Charles-Axel Dein

Here's a very crude way to run pytest only on files that were added or modified:

pytest $(git ls-files --other --modified --exclude-standard | grep test)