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 |
Jeremy Liu | e1014be | 2017-03-22 18:33:00 -0700 | [diff] [blame] | 16 | commands = |
DavidPurcell | 029d8c3 | 2017-01-06 15:27:41 -0500 | [diff] [blame] | 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} |
Jeremy Liu | 78b1925 | 2017-04-01 16:19:09 +0800 | [diff] [blame] | 22 | check-uuid --package patrole_tempest_plugin.tests.api |
Felipe Monteiro | df95870 | 2017-02-27 03:53:50 +0000 | [diff] [blame] | 23 | |
| 24 | [testenv:uuidgen] |
Jeremy Liu | 78b1925 | 2017-04-01 16:19:09 +0800 | [diff] [blame] | 25 | commands = check-uuid --package patrole_tempest_plugin.tests.api --fix |
DavidPurcell | 663aedf | 2017-01-03 10:01:14 -0500 | [diff] [blame] | 26 | |
| 27 | [testenv:venv] |
| 28 | commands = {posargs} |
| 29 | |
| 30 | [testenv:cover] |
Joseph Abad | ae7d7bb | 2017-04-19 12:07:13 -0400 | [diff] [blame] | 31 | commands = rm -rf *.pyc |
| 32 | rm -rf cover |
| 33 | rm -f .coverage |
| 34 | nosetests {posargs} |
Felipe Monteiro | 1ee5f4d | 2017-03-04 18:07:27 +0000 | [diff] [blame] | 35 | setenv = VIRTUAL_ENV={envdir} |
| 36 | NOSE_WITH_COVERAGE=1 |
| 37 | NOSE_COVER_BRANCHES=1 |
| 38 | NOSE_COVER_PACKAGE=patrole_tempest_plugin |
| 39 | NOSE_COVER_HTML=1 |
| 40 | NOSE_COVER_HTML_DIR={toxinidir}/cover |
| 41 | NOSE_WHERE=patrole_tempest_plugin/tests/unit |
| 42 | whitelist_externals = nosetests |
Joseph Abad | ae7d7bb | 2017-04-19 12:07:13 -0400 | [diff] [blame] | 43 | rm |
DavidPurcell | 663aedf | 2017-01-03 10:01:14 -0500 | [diff] [blame] | 44 | |
| 45 | [testenv:docs] |
| 46 | commands = python setup.py build_sphinx |
| 47 | |
| 48 | [testenv:releasenotes] |
| 49 | commands = |
| 50 | sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html |
| 51 | |
| 52 | [testenv:debug] |
HaiJieZhang | ae9db6f | 2017-03-23 11:28:16 +0800 | [diff] [blame] | 53 | commands = oslo_debug_helper -t patrole_tempest_plugin/tests {posargs} |
DavidPurcell | 663aedf | 2017-01-03 10:01:14 -0500 | [diff] [blame] | 54 | |
| 55 | [flake8] |
| 56 | # E123, E125 skipped as they are invalid PEP-8. |
| 57 | |
| 58 | show-source = True |
| 59 | ignore = E123,E125 |
| 60 | builtins = _ |
| 61 | exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build |
Felipe Monteiro | 0854ded | 2017-05-05 16:30:55 +0100 | [diff] [blame] | 62 | |
| 63 | [hacking] |
| 64 | local-check-factory = patrole_tempest_plugin.hacking.checks.factory |