Add coverage reporting
Tox target: cover Exclude: tests dummy driver migrations configs Report: console and html Threshold: 65% Current state: 70% Change-Id: I3d0bb682ed499167e169789d7a222e8ce4637457
This commit is contained in:
parent
2dd7fd1fae
commit
bdb20d5439
9
.coveragerc
Normal file
9
.coveragerc
Normal file
@ -0,0 +1,9 @@
|
||||
[run]
|
||||
source =
|
||||
devops
|
||||
omit =
|
||||
devops/tests/*
|
||||
devops/migrations/*
|
||||
devops/driver/dummy/*
|
||||
devops/settings.py
|
||||
devops/test_settings.py
|
11
tox.ini
11
tox.ini
@ -5,7 +5,7 @@
|
||||
|
||||
[tox]
|
||||
minversion = 1.6
|
||||
envlist = pep8, py{27,34,35}, pylint, pylint-py{27,34,35}
|
||||
envlist = pep8, py{27,34,35}, pylint, pylint-py{27,34,35}, cover
|
||||
skipsdist = True
|
||||
|
||||
[testenv]
|
||||
@ -20,6 +20,15 @@ commands =
|
||||
[testenv:venv]
|
||||
commands = {posargs:}
|
||||
|
||||
[testenv:cover]
|
||||
deps =
|
||||
pytest-cov
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
commands =
|
||||
py.test --cov-config .coveragerc --cov-report html --cov=devops devops/tests
|
||||
coverage report --fail-under 65
|
||||
|
||||
|
||||
[testenv:pep8]
|
||||
deps = hacking==0.10.1
|
||||
usedevelop = False
|
||||
|
Loading…
Reference in New Issue
Block a user