blob: fff568d3214cb87b6cd62f108bb9c8a9e046f7cd [file] [log] [blame]
DavidPurcell663aedf2017-01-03 10:01:14 -05001[tox]
DavidPurcell029d8c32017-01-06 15:27:41 -05002minversion = 1.6
Felipe Monteirodf958702017-02-27 03:53:50 +00003envlist = pep8,py35,py27
DavidPurcell663aedf2017-01-03 10:01:14 -05004skipsdist = True
5
6[testenv]
7usedevelop = True
8install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
9setenv =
10 VIRTUAL_ENV={envdir}
11 PYTHONWARNINGS=default::DeprecationWarning
Felipe Monteirodf958702017-02-27 03:53:50 +000012passenv = 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
13whitelist_externals = find
DavidPurcell029d8c32017-01-06 15:27:41 -050014deps = -r{toxinidir}/requirements.txt
15 -r{toxinidir}/test-requirements.txt
16commands =
17 find . -type f -name "*.pyc" -delete
Felipe Monteirodf958702017-02-27 03:53:50 +000018 ostestr {posargs} --whitelist-file test-whitelist.txt
DavidPurcell663aedf2017-01-03 10:01:14 -050019
20[testenv:pep8]
21commands = flake8 {posargs}
Felipe Monteirodf958702017-02-27 03:53:50 +000022 check-uuid
23
24[testenv:uuidgen]
25commands = check-uuid --fix
DavidPurcell663aedf2017-01-03 10:01:14 -050026
27[testenv:venv]
28commands = {posargs}
29
30[testenv:cover]
Felipe Monteiro1ee5f4d2017-03-04 18:07:27 +000031setenv = 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
38whitelist_externals = nosetests
39commands = nosetests {posargs}
DavidPurcell663aedf2017-01-03 10:01:14 -050040
41[testenv:docs]
42commands = python setup.py build_sphinx
43
44[testenv:releasenotes]
45commands =
46 sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
47
48[testenv:debug]
HaiJieZhangae9db6f2017-03-23 11:28:16 +080049commands = oslo_debug_helper -t patrole_tempest_plugin/tests {posargs}
DavidPurcell663aedf2017-01-03 10:01:14 -050050
51[flake8]
52# E123, E125 skipped as they are invalid PEP-8.
53
54show-source = True
55ignore = E123,E125
56builtins = _
57exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build