coverage.sh 310 B

123456789101112131415
  1. #!/bin/bash
  2. BASEDIR="$(dirname $0)"
  3. . "$BASEDIR"/venv/bin/activate
  4. which coverage >/dev/null 2>&1
  5. if [ "$?" -ne 0 ]; then
  6. pip install coverage
  7. fi
  8. coverage run --branch --source=djadhere,accounts,adhesions,banking,services --omit=*/migrations/*.py "$BASEDIR"/manage.py test
  9. coverage html
  10. coverage report