Jim Rollenhagen | 4f8f229 | 2016-11-18 06:22:18 -0500 | [diff] [blame] | 1 | [tox] |
| 2 | minversion = 2.0 |
qingszhao | aee506f | 2018-06-12 10:36:26 +0800 | [diff] [blame] | 3 | envlist = py3,py27,pep8 |
Jim Rollenhagen | 4f8f229 | 2016-11-18 06:22:18 -0500 | [diff] [blame] | 4 | skipsdist = True |
| 5 | |
| 6 | [testenv] |
| 7 | usedevelop = True |
| 8 | install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages} |
| 9 | setenv = |
| 10 | VIRTUAL_ENV={envdir} |
| 11 | PYTHONWARNINGS=default::DeprecationWarning |
| 12 | deps = -r{toxinidir}/test-requirements.txt |
| 13 | commands = python setup.py test --slowest --testr-args='{posargs}' |
| 14 | |
| 15 | [testenv:pep8] |
qingszhao | aee506f | 2018-06-12 10:36:26 +0800 | [diff] [blame] | 16 | basepython = python3 |
Jim Rollenhagen | 4f8f229 | 2016-11-18 06:22:18 -0500 | [diff] [blame] | 17 | commands = flake8 {posargs} |
| 18 | |
| 19 | [testenv:venv] |
qingszhao | aee506f | 2018-06-12 10:36:26 +0800 | [diff] [blame] | 20 | basepython = python3 |
Jim Rollenhagen | 4f8f229 | 2016-11-18 06:22:18 -0500 | [diff] [blame] | 21 | commands = {posargs} |
| 22 | |
| 23 | [testenv:cover] |
qingszhao | aee506f | 2018-06-12 10:36:26 +0800 | [diff] [blame] | 24 | basepython = python3 |
Jim Rollenhagen | 4f8f229 | 2016-11-18 06:22:18 -0500 | [diff] [blame] | 25 | commands = python setup.py test --coverage --testr-args='{posargs}' |
| 26 | |
| 27 | [testenv:docs] |
qingszhao | aee506f | 2018-06-12 10:36:26 +0800 | [diff] [blame] | 28 | basepython = python3 |
Jim Rollenhagen | 4f8f229 | 2016-11-18 06:22:18 -0500 | [diff] [blame] | 29 | commands = python setup.py build_sphinx |
| 30 | |
| 31 | [testenv:debug] |
qingszhao | aee506f | 2018-06-12 10:36:26 +0800 | [diff] [blame] | 32 | basepython = python3 |
Jim Rollenhagen | 4f8f229 | 2016-11-18 06:22:18 -0500 | [diff] [blame] | 33 | commands = oslo_debug_helper {posargs} |
| 34 | |
| 35 | [flake8] |
John L. Villalovos | d22378d | 2017-08-01 14:47:54 -0700 | [diff] [blame] | 36 | ignore = E129 |
Jim Rollenhagen | 4f8f229 | 2016-11-18 06:22:18 -0500 | [diff] [blame] | 37 | |
| 38 | show-source = True |
| 39 | builtins = _ |
| 40 | exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build |