64 lines
1.6 KiB
INI
64 lines
1.6 KiB
INI
[tox]
|
|
envlist = {py27,py35,pypy}-{mysql,postgres},pep8,cover
|
|
minversion = 2.5
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
OS_TEST_PATH=tests
|
|
CLIENT_NAME=monasca-notification
|
|
passenv = http_proxy
|
|
HTTP_PROXY
|
|
https_proxy
|
|
HTTPS_PROXY
|
|
no_proxy
|
|
NO_PROXY
|
|
usedevelop = True
|
|
install_command =
|
|
{toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages} --pre
|
|
whitelist_externals = bash
|
|
find
|
|
rm
|
|
deps = -r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands =
|
|
find . -type f -name "*.pyc" -delete
|
|
rm -Rf .testrepository/times.dbm
|
|
ostestr {posargs}
|
|
|
|
[testenv:cover]
|
|
commands =
|
|
{[testenv]commands}
|
|
coverage erase
|
|
python setup.py test --coverage --testr-args='{posargs}' --coverage-package-name=monasca_notification
|
|
coverage report
|
|
|
|
[testenv:debug]
|
|
commands =
|
|
oslo_debug_helper -t ./monasca_notification/tests {posargs}
|
|
|
|
[testenv:pep8]
|
|
commands =
|
|
{[testenv:flake8]commands}
|
|
{[testenv:bandit]commands}
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:flake8]
|
|
commands =
|
|
flake8 monasca_notification
|
|
|
|
[testenv:bandit]
|
|
commands =
|
|
bandit -r monasca_notification -n5 -x monasca_notification/tests
|
|
|
|
[flake8]
|
|
max-line-length = 120
|
|
# TODO: ignored checks should be enabled in the future
|
|
# H201 no 'except:' at least use 'except Exception:'
|
|
# H405 multi line docstring summary not separated with an empty line
|
|
ignore = F821,H201,H405
|
|
exclude=.venv,.git,.tox,dist,*egg,build
|