monasca-api/tox.ini

86 lines
2.0 KiB
INI

[tox]
envlist = py27,pep8
minversion = 2.1
skipsdist = True
[testenv]
setenv =
VIRTUAL_ENV={envdir}
OS_TEST_PATH=monasca_api/tests
CLIENT_NAME=monasca-api
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}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
whitelist_externals = bash
find
rm
commands =
find . -type f -name "*.pyc" -delete
[testenv:py27]
basepython = python2.7
deps = {[testenv:unit_deps]deps}
commands =
{[testenv]commands}
ostestr {posargs}
[testenv:py35]
basepython = python3.5
deps = {[testenv:unit_deps]deps}
commands =
{[testenv]commands}
ostestr {posargs}
[testenv:cover]
basepython = python2.7
deps = {[testenv:unit_deps]deps}
commands =
{[testenv]commands}
coverage erase
python setup.py test --coverage --testr-args='{posargs}' --coverage-package-name=monasca_api
coverage report
[testenv:debug]
deps = {[testenv:unit_deps]deps}
commands =
{[testenv]commands}
oslo_debug_helper -t ./monasca_api/tests {posargs}
[testenv:pep8]
commands =
flake8 monasca_api
[testenv:venv]
commands = {posargs}
# note(trebskit): this is just placeholder to wrap all common dependencies
# needed to run tests, those dependencies won't likely
# be needed for every possible -e here, so extracted them here
[testenv:unit_deps]
deps =
{[testenv]deps}
influxdb==2.8.0
cassandra-driver>=2.1.4,!=3.6.0
[flake8]
# TODO: ignored checks should be enabled in the future
# H201 no 'except:' at least use 'except Exception:'
# H302 import only modules
# H405 multi line docstring summary not separated with an empty line
ignore = F821,H201,H302,H405
max-complexity = 50
max-line-length = 120
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools,build
show-source = True
[hacking]