6a4445eb6c
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: Ic4edafbbcb57454c2592483b6348d46138320ab5
47 lines
1.1 KiB
INI
47 lines
1.1 KiB
INI
[tox]
|
|
minversion = 2.0
|
|
envlist = py27,py34,py35,pep8
|
|
|
|
[testenv]
|
|
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
|
deps =
|
|
-r{toxinidir}/test-requirements.txt
|
|
-r{toxinidir}/requirements.txt
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
PYTHONPATH = {toxinidir}
|
|
commands = nosetests --tests almanach.tests.unit
|
|
|
|
[testenv:genconfig]
|
|
basepython = python3
|
|
commands = oslo-config-generator --namespace almanach --output-file=etc/almanach/almanach.conf
|
|
|
|
[testenv:venv]
|
|
basepython = python3
|
|
commands = {posargs}
|
|
|
|
[testenv:pep8]
|
|
basepython = python3
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
commands = flake8 {posargs}
|
|
|
|
[testenv:docs]
|
|
basepython = python3
|
|
commands = python setup.py build_sphinx --fresh-env
|
|
|
|
[flake8]
|
|
show-source = True
|
|
enable-extensions = H106,H203
|
|
max-line-length = 120
|
|
exclude = .venv,.git,.tox,dist,doc,*egg,build
|
|
|
|
[hacking]
|
|
local-check-factory = almanach.hacking.checks.factory
|
|
|
|
[testenv:lower-constraints]
|
|
basepython = python3
|
|
deps =
|
|
-c{toxinidir}/lower-constraints.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
-r{toxinidir}/requirements.txt
|