Move coverage configuration to .coverage

Introduce a .coveragerc file to omit multiple files from test coverage
such as django's migrations, env and the tests itself.
This commit is contained in:
Jelle van der Waa 2017-06-11 15:00:00 +02:00
parent 6b901ca5c2
commit 2ddb51512b
2 changed files with 9 additions and 1 deletions

8
.coveragerc Normal file
View File

@ -0,0 +1,8 @@
# .coveragerc to control coverage.py
[run]
omit =
**/migrations/*.py
**/tests.py
env*
/home/travis/virtualenv*

View File

@ -5,7 +5,7 @@ install: "pip install -r requirements.txt && pip install coveralls"
script: script:
- python manage.py collectstatic --noinput - python manage.py collectstatic --noinput
- coverage run --omit='env*' --source='.' manage.py test - coverage run --rcfile .coveragerc manage.py test
after_success: after_success:
- coveralls - coveralls