collectd-openstack-plugins/tox.ini
huang.zhiping d2229c9b76 fix tox python3 overrides
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: I0fe605c2f827a528a12e8f64219ba2bdff028db0
2018-08-20 11:39:01 +00:00

54 lines
1.6 KiB
INI

# Tox (http://tox.testrun.org/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
[tox]
minversion = 1.6
envlist = py{36,35,27},pep8,docs,releasenotes
skipsdist = True
[testenv]
usedevelop = True
setenv =
VIRTUAL_ENV={envdir}
CONSTRAINTS_OPT=-c {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
install_command = pip install -U {opts} {packages}
commands = stestr run --slowest '{posargs}'
deps = {env:CONSTRAINTS_OPT}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
whitelist_externals = sh
[testenv:pep8]
basepython = python3
commands = flake8 collectd_openstack
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:docs]
basepython = python3
#fixeme(sean-k-mooney): add -W to treat warnings as errors once warnings are fixed
commands = sphinx-build doc/source doc/build
[testenv:releasenotes]
basepython = python3
#fixeme(sean-k-mooney): add -W to treat warnings as errors once warnings are fixed
#NOTE(sean-k-mooney): our releasenotes crash sphinx so we should really fix them ...
commands =
sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[pep8]
max-line-length = 80
[flake8]
# E123, E125 skipped as they are invalid PEP-8.
max-line-length = 80
show-source = True
ignore = E123,E125,E241
builtins = _
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build