diff --git a/coverage.sh b/coverage.sh index 2437302..5b8faab 100755 --- a/coverage.sh +++ b/coverage.sh @@ -1,9 +1,11 @@ #!/bin/bash -# you must install coverage before executing this script -# pip install coverage - . env/bin/activate +which coverage >/dev/null 2>&1 +if [ "$?" -ne 0 ]; then + pip install coverage +fi + coverage run manage.py test coverage report