DavidPurcell | 663aedf | 2017-01-03 10:01:14 -0500 | [diff] [blame] | 1 | [tox] |
DavidPurcell | 029d8c3 | 2017-01-06 15:27:41 -0500 | [diff] [blame] | 2 | minversion = 1.6 |
Felipe Monteiro | df95870 | 2017-02-27 03:53:50 +0000 | [diff] [blame] | 3 | envlist = pep8,py35,py27 |
DavidPurcell | 663aedf | 2017-01-03 10:01:14 -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 |
Felipe Monteiro | df95870 | 2017-02-27 03:53:50 +0000 | [diff] [blame] | 12 | passenv = OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_TEST_TIMEOUT OS_TEST_LOCK_PATH OS_TEST_PATH http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY |
| 13 | whitelist_externals = find |
DavidPurcell | 029d8c3 | 2017-01-06 15:27:41 -0500 | [diff] [blame] | 14 | deps = -r{toxinidir}/requirements.txt |
| 15 | -r{toxinidir}/test-requirements.txt |
| 16 | commands = |
| 17 | find . -type f -name "*.pyc" -delete |
Felipe Monteiro | df95870 | 2017-02-27 03:53:50 +0000 | [diff] [blame] | 18 | ostestr {posargs} --whitelist-file test-whitelist.txt |
DavidPurcell | 663aedf | 2017-01-03 10:01:14 -0500 | [diff] [blame] | 19 | |
| 20 | [testenv:pep8] |
| 21 | commands = flake8 {posargs} |
Felipe Monteiro | df95870 | 2017-02-27 03:53:50 +0000 | [diff] [blame] | 22 | check-uuid |
| 23 | |
| 24 | [testenv:uuidgen] |
| 25 | commands = check-uuid --fix |
DavidPurcell | 663aedf | 2017-01-03 10:01:14 -0500 | [diff] [blame] | 26 | |
| 27 | [testenv:venv] |
| 28 | commands = {posargs} |
| 29 | |
| 30 | [testenv:cover] |
Felipe Monteiro | 1ee5f4d | 2017-03-04 18:07:27 +0000 | [diff] [blame^] | 31 | setenv = VIRTUAL_ENV={envdir} |
| 32 | NOSE_WITH_COVERAGE=1 |
| 33 | NOSE_COVER_BRANCHES=1 |
| 34 | NOSE_COVER_PACKAGE=patrole_tempest_plugin |
| 35 | NOSE_COVER_HTML=1 |
| 36 | NOSE_COVER_HTML_DIR={toxinidir}/cover |
| 37 | NOSE_WHERE=patrole_tempest_plugin/tests/unit |
| 38 | whitelist_externals = nosetests |
| 39 | commands = nosetests {posargs} |
DavidPurcell | 663aedf | 2017-01-03 10:01:14 -0500 | [diff] [blame] | 40 | |
| 41 | [testenv:docs] |
| 42 | commands = python setup.py build_sphinx |
| 43 | |
| 44 | [testenv:releasenotes] |
| 45 | commands = |
| 46 | sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html |
| 47 | |
| 48 | [testenv:debug] |
| 49 | commands = oslo_debug_helper {posargs} |
| 50 | |
| 51 | [flake8] |
| 52 | # E123, E125 skipped as they are invalid PEP-8. |
| 53 | |
| 54 | show-source = True |
| 55 | ignore = E123,E125 |
| 56 | builtins = _ |
| 57 | exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build |