Browse Source

helpers scripts

Élie Bouttier 8 years ago
parent
commit
c1ab1de237
3 changed files with 24 additions and 0 deletions
  1. 2 0
      .gitignore
  2. 14 0
      coverage.sh
  3. 8 0
      run-server.sh

+ 2 - 0
.gitignore

@@ -4,3 +4,5 @@
 *.sqlite3
 *.back
 djadhere/*_settings.py
+.coverage
+htmlcov

+ 14 - 0
coverage.sh

@@ -0,0 +1,14 @@
+#!/bin/bash
+
+
+BASEDIR="$(dirname $0)"
+
+. "$BASEDIR"/venv/bin/activate
+
+which coverage >/dev/null 2>&1
+if [ "$?" -ne 0 ]; then
+  pip install coverage
+fi
+
+coverage run --branch --source=djadhere,accounts,adhesions,banking,services --omit=*/migrations/*.py "$BASEDIR"/manage.py test
+coverage report

+ 8 - 0
run-server.sh

@@ -0,0 +1,8 @@
+#!/bin/bash
+
+
+BASEDIR="$(dirname $0)"
+
+. "$BASEDIR"/venv/bin/activate
+
+"$BASEDIR"/manage.py runserver --settings=djadhere.local_settings $(hostname):8000