dein.fr

Running pytest on modified files

Author: charlax
Written: 
Category: today-i-learned

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)