blob: 17529a8cf5f10ff259c1f8a066e0351b9e7b466a [file] [log] [blame]
Avishek Dutadd808332018-09-20 13:27:10 -05001[tox]
2minversion = 1.6
3envlist = pep8,py35,py27
4skipsdist = 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 OS_TEST_PATH=./tungsten_tempest_plugin/tests/unit
12 LANGUAGE=en_US
13 LC_ALL=en_US.utf-8
14 PYTHONWARNINGS=default::DeprecationWarning
15passenv = OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_TEST_TIMEOUT OS_TEST_LOCK_PATH http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
16whitelist_externals = find
17deps = -r{toxinidir}/requirements.txt
18 -r{toxinidir}/test-requirements.txt
19commands =
20 find . -type f -name "*.pyc" -delete
21 stestr --test-path ./tungsten_tempest_plugin/tests/unit run {posargs}
22
23[testenv:pep8]
24basepython = python3
25commands = flake8 {posargs}
26 check-uuid --package tungsten_tempest_plugin.tests.api
27
28[testenv:uuidgen]
29basepython = python3
30commands = check-uuid --package tungsten_tempest_plugin.tests.api --fix
31
32[testenv:venv]
33basepython = python3
34commands = {posargs}
35
36[testenv:cover]
37basepython = python3
38commands = rm -rf *.pyc
39 rm -rf cover
40 rm -f .coverage
41 nosetests {posargs}
42setenv = VIRTUAL_ENV={envdir}
43 NOSE_WITH_COVERAGE=1
44 NOSE_COVER_BRANCHES=1
45 NOSE_COVER_PACKAGE=tungsten_tempest_plugin
46 NOSE_COVER_HTML=1
47 NOSE_COVER_HTML_DIR={toxinidir}/cover
48 NOSE_WHERE=tungsten_tempest_plugin/tests/unit
49whitelist_externals = nosetests
50 rm
51
52[testenv:docs]
53basepython = python3
54deps =
55 -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
56 -r{toxinidir}/requirements.txt
57 -r{toxinidir}/doc/requirements.txt
58commands =
59 rm -rf doc/build
60 sphinx-build -W -b html doc/source doc/build/html
61whitelist_externals = rm
62
63[testenv:releasenotes]
64basepython = python3
65deps =
66 -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
67 -r{toxinidir}/requirements.txt
68 -r{toxinidir}/doc/requirements.txt
69commands =
70 rm -rf releasenotes/build
71 sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
72whitelist_externals = rm
73
74[testenv:debug]
75basepython = python3
76commands = oslo_debug_helper -t tungsten_tempest_plugin/tests {posargs}
77
78[testenv:genconfig]
79basepython = python3
80commands = oslo-config-generator --config-file etc/config-generator.tungsten_tempest.conf
81
82[flake8]
83# [H106] Don't put vim configuration in source files.
84# [H203] Use assertIs(Not)None to check for None.
85# [H204] Use assert(Not)Equal to check for equality.
86# [H205] Use assert(Greater|Less)(Equal) for comparison.
87# [H210] Require 'autospec', 'spec', or 'spec_set' in mock.patch/mock.patch.object calls
88# [H904] Delay string interpolations at logging calls.
89enable-extensions = H106,H203,H204,H205,H210,H904
90show-source = True
91# E123, E125 skipped as they are invalid PEP-8.
92#
93# H405 is another one that is good as a guideline, but sometimes
94# multiline doc strings just don't have a natural summary
95# line. Rejecting code for this reason is wrong.
96ignore = E123,E125,H405
97builtins = _
98exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
99
100[hacking]
101local-check-factory = tungsten_tempest_plugin.hacking.checks.factory
102
103[testenv:lower-constraints]
104basepython = python3
105deps =
106 -c{toxinidir}/lower-constraints.txt
107 -r{toxinidir}/test-requirements.txt
108 -r{toxinidir}/requirements.txt