blob: a004c6e7406623ba48b8264303e21764c01f5a4f [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
Jeremy Liue1014be2017-03-22 18:33:00 -070016commands =
DavidPurcell029d8c32017-01-06 15:27:41 -050017 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}
Jeremy Liu78b19252017-04-01 16:19:09 +080022 check-uuid --package patrole_tempest_plugin.tests.api
Felipe Monteirodf958702017-02-27 03:53:50 +000023
24[testenv:uuidgen]
Jeremy Liu78b19252017-04-01 16:19:09 +080025commands = check-uuid --package patrole_tempest_plugin.tests.api --fix
DavidPurcell663aedf2017-01-03 10:01:14 -050026
27[testenv:venv]
28commands = {posargs}
29
30[testenv:cover]
Joseph Abadae7d7bb2017-04-19 12:07:13 -040031commands = rm -rf *.pyc
32 rm -rf cover
33 rm -f .coverage
34 nosetests {posargs}
Felipe Monteiro1ee5f4d2017-03-04 18:07:27 +000035setenv = 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
42whitelist_externals = nosetests
Joseph Abadae7d7bb2017-04-19 12:07:13 -040043 rm
DavidPurcell663aedf2017-01-03 10:01:14 -050044
45[testenv:docs]
46commands = python setup.py build_sphinx
47
48[testenv:releasenotes]
49commands =
50 sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
51
52[testenv:debug]
HaiJieZhangae9db6f2017-03-23 11:28:16 +080053commands = oslo_debug_helper -t patrole_tempest_plugin/tests {posargs}
DavidPurcell663aedf2017-01-03 10:01:14 -050054
55[flake8]
56# E123, E125 skipped as they are invalid PEP-8.
57
58show-source = True
59ignore = E123,E125
60builtins = _
61exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build