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 # Testing
bandit 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 flake8>=3.3.0
mock mock
pytest==3.2.1 pytest==3.2.1
pytest-cov
pytest-mock pytest-mock
responses>=0.8.1 responses>=0.8.1
testtools==2.3.0

19
tox.ini
View File

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