Colleen Murphy | 44df103 | 2017-05-30 16:21:48 +0200 | [diff] [blame] | 1 | [tox] |
| 2 | minversion = 2.0 |
Arundhati Surpur | aeaa809 | 2017-07-19 18:12:30 +0530 | [diff] [blame] | 3 | envlist = py35,py27,pypy,pep8 |
Colleen Murphy | 44df103 | 2017-05-30 16:21:48 +0200 | [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] |
huang.zhiping | 4dbc50b | 2018-06-09 09:27:17 +0800 | [diff] [blame] | 16 | basepython = python3 |
Colleen Murphy | 44df103 | 2017-05-30 16:21:48 +0200 | [diff] [blame] | 17 | commands = flake8 {posargs} |
| 18 | |
| 19 | [testenv:venv] |
huang.zhiping | 4dbc50b | 2018-06-09 09:27:17 +0800 | [diff] [blame] | 20 | basepython = python3 |
Colleen Murphy | 44df103 | 2017-05-30 16:21:48 +0200 | [diff] [blame] | 21 | commands = {posargs} |
| 22 | |
| 23 | [testenv:cover] |
huang.zhiping | 4dbc50b | 2018-06-09 09:27:17 +0800 | [diff] [blame] | 24 | basepython = python3 |
Colleen Murphy | 44df103 | 2017-05-30 16:21:48 +0200 | [diff] [blame] | 25 | commands = python setup.py test --coverage --testr-args='{posargs}' |
| 26 | |
| 27 | [testenv:docs] |
huang.zhiping | 4dbc50b | 2018-06-09 09:27:17 +0800 | [diff] [blame] | 28 | basepython = python3 |
Colleen Murphy | 44df103 | 2017-05-30 16:21:48 +0200 | [diff] [blame] | 29 | commands = python setup.py build_sphinx |
| 30 | |
| 31 | [testenv:releasenotes] |
huang.zhiping | 4dbc50b | 2018-06-09 09:27:17 +0800 | [diff] [blame] | 32 | basepython = python3 |
Colleen Murphy | 44df103 | 2017-05-30 16:21:48 +0200 | [diff] [blame] | 33 | commands = |
| 34 | sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html |
| 35 | |
| 36 | [testenv:debug] |
huang.zhiping | 4dbc50b | 2018-06-09 09:27:17 +0800 | [diff] [blame] | 37 | basepython = python3 |
Colleen Murphy | 44df103 | 2017-05-30 16:21:48 +0200 | [diff] [blame] | 38 | commands = oslo_debug_helper {posargs} |
| 39 | |
| 40 | [flake8] |
| 41 | # E123, E125 skipped as they are invalid PEP-8. |
| 42 | |
| 43 | show-source = True |
| 44 | ignore = E123,E125 |
| 45 | builtins = _ |
| 46 | exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build |