Merge "fix(coverage): add coverage rc file"

This commit is contained in:
Zuul 2018-06-08 23:36:44 +00:00 committed by Gerrit Code Review
commit 1a765cbdf2
4 changed files with 23 additions and 12 deletions

7
.coveragerc Normal file
View File

@ -0,0 +1,7 @@
[run]
branch = True
source = armada
omit = armada/tests/*
[report]
ignore_errors = True

3
.stestr.conf Normal file
View File

@ -0,0 +1,3 @@
[DEFAULT]
test_path=armada/tests/unit
top_dir=./

View File

@ -7,11 +7,11 @@ sphinx_rtd_theme>=0.2.4
# Testing
bandit
codecov
coverage!=4.4,>=4.5.1 # Apache-2.0
testtools>=2.3.0 # MIT
os-testr>=1.0.0 # Apache-2.0
flake8>=3.3.0
mock
pytest==3.2.1
pytest-cov
pytest-mock
responses>=0.8.1
testtools==2.3.0

19
tox.ini
View File

@ -1,6 +1,6 @@
[tox]
skipsdist = True
envlist = py35, pep8, coverage, bandit
envlist = py35, pep8, cover, bandit
[testenv]
deps=
@ -53,15 +53,16 @@ commands =
bandit -r armada -x armada/tests -n 5
[testenv:cover]
passenv=http_proxy https_proxy no_proxy HTTP_PROXY HTTPS_PROXY NO_PROXY
setenv=
VIRTUAL_ENV={envdir}
setenv = {[testenv]setenv}
PYTHON=coverage run --source armada --parallel-mode
commands =
python -m pytest \
--cov-branch \
--cov-report term-missing:skip-covered \
--cov-config .coveragerc \
--cov=armada
coverage erase
find . -type f -name "*.pyc" -delete
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report
[flake8]
filename = *.py