monasca-log-api/tox.ini

90 lines
2.0 KiB
INI

[tox]
envlist = py{27,35},pep8,cover
minversion = 2.1
skipsdist = True
[testenv]
usedevelop = True
setenv = VIRTUAL_ENV={envdir}
OS_TEST_PATH=monasca_log_api/tests
CLIENT_NAME=monasca-log-api
passenv = http_proxy
HTTP_PROXY
https_proxy
HTTPS_PROXY
no_proxy
NO_PROXY
whitelist_externals = bash
find
rm
install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
find ./ -type f -name '*.pyc' -delete
[testenv:py27]
basepython = python2.7
commands =
{[testenv]commands}
ostestr {posargs}
[testenv:py35]
basepython = python3.5
commands =
{[testenv]commands}
ostestr {posargs}
[testenv:cover]
basepython = python2.7
commands =
{[testenv]commands}
coverage erase
python setup.py test --coverage --testr-args='{posargs}' --coverage-package-name=monasca_log_api
coverage report
[testenv:debug]
commands =
{[testenv]commands}
oslo_debug_helper -t ./monasca_log_api/tests {posargs}
[testenv:bashate]
deps = bashate
whitelist_externals = bashate
commands =
# Ignore too long lines error E006 from bashate and treat
# E005, E042 as errors.
bashate -v -iE006 -eE005,E042 devstack/plugin.sh
[testenv:bandit]
commands =
# FIXME(dmllr); B101 needs to be fixed first
bandit -r monasca_log_api -n5 -s B101 -x monasca_log_api/tests
[testenv:flake8]
commands =
flake8 monasca_log_api
[testenv:pep8]
deps =
{[testenv]deps}
{[testenv:bashate]deps}
commands =
{[testenv:flake8]commands}
{[testenv:bandit]commands}
{[testenv:bashate]commands}
[testenv:docs]
commands =
rm -rf doc/build
python setup.py build_sphinx
[testenv:venv]
commands = {posargs}
[flake8]
exclude = .git,.tox,dist,doc,documentation,*.egg,build
show-source = True
[hacking]