d08b147ea4
We want to default to running all tox environments under python 3, so set the basepython value in each environment. We do not want to specify a minor version number, because we do not want to have to update the file every time we upgrade python. We do not want to set the override once in testenv, because that breaks the more specific versions used in default environments like py35 and py36. Change-Id: I7150a260a3b423b138a710edf71efaa8762cd849 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
96 lines
2.4 KiB
INI
96 lines
2.4 KiB
INI
[tox]
|
||
minversion = 1.6
|
||
envlist = py35,py27,pep8
|
||
skipsdist = True
|
||
|
||
[testenv]
|
||
usedevelop = True
|
||
install_command = pip install -U {opts} {packages}
|
||
setenv =
|
||
VIRTUAL_ENV={envdir}
|
||
deps = -r{toxinidir}/requirements.txt
|
||
-r{toxinidir}/test-requirements.txt
|
||
whitelist_externals = bash
|
||
|
||
[tox:jenkins]
|
||
downloadcache = ~/cache/pip
|
||
|
||
[testenv:pep8]
|
||
basepython = python3
|
||
commands = flake8
|
||
|
||
[testenv:venv]
|
||
basepython = python3
|
||
commands = {posargs}
|
||
|
||
[testenv:py27]
|
||
commands =
|
||
stestr run --black-regex ".tests.functional" '{posargs}'
|
||
|
||
[testenv:py35]
|
||
basepython = python3
|
||
commands =
|
||
stestr run --black-regex ".tests.functional" '{posargs}'
|
||
|
||
[testenv:functional]
|
||
basepython = python2.7
|
||
setenv =
|
||
{[testenv]setenv}
|
||
commands =
|
||
stestr run --black-regex ".tests.unit" '{posargs}'
|
||
|
||
[testenv:cover]
|
||
basepython = python3
|
||
commands =
|
||
coverage erase
|
||
python setup.py testr --coverage --testr-args='--concurrency=1 {posargs}'
|
||
coverage combine
|
||
coverage html --include='os_vif/*' -d covhtml -i
|
||
|
||
[testenv:docs]
|
||
basepython = python3
|
||
commands = python setup.py build_sphinx
|
||
|
||
[testenv:releasenotes]
|
||
basepython = python3
|
||
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
||
|
||
[flake8]
|
||
# E123, E125 skipped as they are invalid PEP-8.
|
||
# Following checks are ignored on purpose.
|
||
#
|
||
# E251 unexpected spaces around keyword / parameter equals
|
||
# reason: no improvement in readability
|
||
#
|
||
# E265 block comment should start with '# '
|
||
# reason: no improvement in readability
|
||
#
|
||
# H904 wrap long lines in parentheses instead of a backslash
|
||
# reason: removed in hacking (https://review.openstack.org/#/c/101701/)
|
||
#
|
||
# H404 skipped on purpose per jay pipes discussion.
|
||
#
|
||
# Due to the upgrade to hacking 0.9.2 the following checking are
|
||
# ignored on purpose for the moment and should be re-enabled.
|
||
# H106: Don’t put vim configuration in source files
|
||
# H203: Use assertIs(Not)None to check for None
|
||
|
||
show-source = True
|
||
ignore = E123,E125,E126,E127,E128,E251,E265,H302,H405,H904,H404
|
||
enable-extensions=H106,H203
|
||
builtins = _
|
||
exclude=.venv,.git,.tox,dist,*lib/python*,*egg,build
|
||
max-complexity=30
|
||
|
||
[hacking]
|
||
import_exceptions = os_vif.i18n
|
||
|
||
[testenv:lower-constraints]
|
||
basepython = python3
|
||
deps =
|
||
-c{toxinidir}/lower-constraints.txt
|
||
-r{toxinidir}/test-requirements.txt
|
||
-r{toxinidir}/requirements.txt
|
||
commands =
|
||
stestr run --black-regex ".tests.functional" '{posargs}'
|