From 76aba7f0e7f7b012425f6efcc5bae06daca1f40a Mon Sep 17 00:00:00 2001 From: virusdefender <1670873886@qq.com> Date: Tue, 4 Aug 2015 18:38:00 +0800 Subject: [PATCH] add coverage requirement and run test shell script --- requirements.txt | 3 ++- tools/runserver.sh | 2 ++ tools/runtest.sh | 4 ++++ 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 tools/runserver.sh create mode 100644 tools/runtest.sh diff --git a/requirements.txt b/requirements.txt index 00da332a..bb0fce33 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,4 +5,5 @@ django-redis-sessions djangorestframework django-rest-swagger celery -gunicorn \ No newline at end of file +gunicorn +coverage \ No newline at end of file diff --git a/tools/runserver.sh b/tools/runserver.sh new file mode 100644 index 00000000..d508cfc5 --- /dev/null +++ b/tools/runserver.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +python manage.py runserver \ No newline at end of file diff --git a/tools/runtest.sh b/tools/runtest.sh new file mode 100644 index 00000000..2fc4d4a9 --- /dev/null +++ b/tools/runtest.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +coverage run --source='.' manage.py test +nose html +open htmlcov/index.html