Add support for pytest

This commit is contained in:
Jim Fingal
2020-11-08 12:14:57 -08:00
parent 58237b6984
commit 0b8a9cf1a6
5 changed files with 18 additions and 1 deletions

9
fr-dev
View File

@ -46,6 +46,9 @@ case "$1" in
migrate)
runweb python manage.py migrate
;;
bash)
runweb bash
;;
shell)
runweb python manage.py shell
;;
@ -59,6 +62,10 @@ case "$1" in
shift 1
runweb coverage run --source='.' --omit="*/test*,celerywyrm*,bookwyrm/migrations/*" manage.py test "$@"
;;
pytest)
shift 1
runweb pytest "$@"
;;
test_report)
runweb coverage report
;;
@ -72,6 +79,6 @@ case "$1" in
clean
;;
*)
echo "Unrecognised command. Try: build, clean, up, initdb, resetdb, makemigrations, migrate, shell, dbshell, restart_celery, test, test_report"
echo "Unrecognised command. Try: build, clean, up, initdb, resetdb, makemigrations, migrate, bash, shell, dbshell, restart_celery, test, pytest, test_report"
;;
esac