Created
June 12, 2018 12:34
-
-
Save blfpd/287129f2a3d115c35eb0ee1574c24b27 to your computer and use it in GitHub Desktop.
Run coverage for a django project with watchexec
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cover() { | |
watchexec -r -s SIGTERM -w src -e py -- 'coverage run ./src/manage.py test --keepdb '$1' && coverage xml -o cov.xml ; coverage report --skip-covered' | |
} | |
cov() { | |
watchexec -r -s SIGTERM -w src -e py -- 'coverage run --parallel-mode ./src/manage.py test --keepdb --parallel 2 --exclude-tag slow '$1' && coverage xml -o cov.xml && coverage report --skip-covered' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment