25d1ff9c17
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: I7a3be998629ea8ea56ede75bdd05380019cc9372
51 lines
1.0 KiB
INI
51 lines
1.0 KiB
INI
[tox]
|
|
envlist = py35,py27,pep8
|
|
|
|
[testenv]
|
|
basepython = python3
|
|
install_command = pip install -U {opts} {packages}
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
|
|
commands = stestr run {posargs}
|
|
stestr slowest
|
|
# commands =
|
|
# python setup.py test --coverage --coverage-package-name=git_nit --slowest --testr-args='{posargs}'
|
|
# coverage report --show-missing
|
|
|
|
deps =
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
[testenv:py27]
|
|
basepython = python2.7
|
|
|
|
[testenv:pep8]
|
|
basepython = python3
|
|
commands = flake8
|
|
skip_install = True
|
|
|
|
[testenv:cover]
|
|
basepython = python3
|
|
setenv =
|
|
{[testenv]setenv}
|
|
PYTHON=coverage run --source shade --parallel-mode
|
|
commands =
|
|
stestr run {posargs}
|
|
coverage combine
|
|
coverage html -d cover
|
|
coverage xml -o cover/coverage.xml
|
|
|
|
[testenv:docs]
|
|
basepython = python3
|
|
commands = python setup.py build_sphinx
|
|
|
|
[testenv:venv]
|
|
basepython = python3
|
|
usedevelop = true
|
|
commands = {posargs}
|
|
|
|
[flake8]
|
|
show-source = True
|
|
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|