forked from bread-and-pepper/django-userena
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_tests
executable file
·20 lines (17 loc) · 840 Bytes
/
run_tests
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env bash
# TODO: How to tell setup.py to only run some tests.
case $1 in
userena ) echo -e "\033[1mRunning tests for userena.\033[0m"
cmd="coverage run demo/manage.py test userena"
report_cmd="coverage report -m userena/*.py userena/management/commands/*.py"
;;
umessages ) echo -e "\033[1mRunning tests for umessages.\033[0m"
cmd="coverage run demo/manage.py test umessages"
report_cmd="coverage report -m userena/contrib/umessages/*.py"
;;
* ) echo -e "\033[1mRunning all tests.\033[0m"
cmd="coverage run demo/manage.py test userena umessages"
report_cmd="coverage report -m userena/*.py userena/management/commands/*py userena/contrib/umessages/*.py"
esac
$cmd
$report_cmd