monasca-ui/tox.ini
huang.zhiping 402c0847a3 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: I66b43b70c5ffd077e58e5a5f0e631bd3a0aa080a
2018-08-15 06:41:11 +00:00

55 lines
1.3 KiB
INI

[tox]
envlist = py27,pep8,py35
minversion = 2.6
skipsdist = True
[testenv]
usedevelop = True
passenv = http_proxy
HTTP_PROXY
https_proxy
HTTPS_PROXY
no_proxy
NO_PROXY
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
install_command = pip install {opts} {packages}
whitelist_externals =
/bin/bash
find
commands =
find . -type f -name "*.pyc" -delete
/bin/bash run_tests.sh -N {posargs}
[testenv:py27]
setenv =
DJANGO_SETTINGS_MODULE=monitoring.test.settings
[testenv:pep8]
basepython = python3
commands =
/bin/bash run_tests.sh -N --pep8
python setup.py check --restructuredtext --strict
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:cover]
basepython = python3
commands = /bin/bash run_tests.sh -N --coverage {posargs}
[flake8]
max-line-length = 100
builtins = _
exclude = .venv,.git,.tox,dist,*lib/python*,*egg,build,panel_template,dash_template,local_settings.py,*/local/*,*/test/test_plugins/*
[testenv:lower-constraints]
basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt