Commit ac514c39 authored by BorjaEst's avatar BorjaEst
Browse files

Tox pytest updated

parent 2f63ff44
flake8
bandit>=1.1.0 # Apache-2.0
# Remove once we rely on coverage 4.3+
# https://bitbucket.org/ned/coveragepy/issues/519/
coverage!=4.4,>=4.0 # Apache-2.0
stestr>=1.0.0 # Apache-2.0
testtools>=1.4.0
pytest
pytest-cov
[tox]
minversion = 1.6
envlist = py36,pep8
skipsdist = True
envlist = clean,pep8,py36,report
[testenv]
commands = pytest --basetemp="{envtmpdir}" \
--confcutdir=".." \
--numprocesses='auto' \
--cov="o3skim" \
--cov-append \
--cov-report=term-missing \
{posargs}
install_command = pip install -U {opts} {packages}
usedevelop = True
basepython = python3
whitelist_externals = find
install_command = pip install -U {opts} {packages}
# use en_US.UTF-8 as C.UTF-8 doesn't exist in RHEL7
allowlist_externals = rm
deps =
pytest
pytest-xdist
pytest-cov
depends =
{pep8, py36}: clean
report: py36
setenv =
VIRTUAL_ENV={envdir}
LC_ALL=C.UTF-8
OS_STDOUT_CAPTURE=1
OS_STDERR_CAPTURE=1
OS_TEST_TIMEOUT=160
deps = -r{toxinidir}/test-requirements.txt
commands = find . -type f -name "*.pyc" -delete
[testenv:cover]
# TODO(stephenfin): Remove the PYTHON hack below in favour of a [coverage]
# section once we rely on coverage 4.3+
#
# https://bitbucket.org/ned/coveragepy/issues/519/
envdir = {toxworkdir}/shared
setenv =
{[testenv]setenv}
PYTHON=coverage run --source o3skim --parallel-mode
commands =
{[testenv]commands}
[testenv:clean]
deps = coverage
skip_install = true
commands =
coverage erase
stestr -v run --serial {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report
rm {toxinidir}/flake8.log
[testenv:py36]
# TODO(efried): Remove this once https://github.com/tox-dev/tox/issues/425 is fixed.
basepython = python3.6
[testenv:report]
deps = coverage
skip_install = true
commands =
{[testenv]commands}
stestr -v run --serial {posargs}
coverage report
coverage html
[testenv:pep8]
deps =flake8
envdir = {toxworkdir}/shared
commands = - flake8 --format=pylint --output-file=flake8.log
[testenv:bandit]
envdir = {toxworkdir}/shared
commands = bandit -r o3skim -x tests -s B110,B410
[flake8]
# H803 skipped on purpose per list discussion.
# E123, E125 skipped as they are invalid PEP-8.
show-source = True
ignore = E123,E125,H803,H405
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
[testenv:cobertura]
commands = py.test --cov=o3skim --cov-report=xml --cov-report=term-missing tests
[testenv:bandit-report]
#basepython = python2.7
commands =
- mkdir /tmp/bandit
- bandit -r o3skim -x tests -s B110,B410 -f html -o /tmp/bandit/index.html
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment