blob: e3d3ee0d4a04622292c98f23ea25f77a877d2226 [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
Avishek Dutadd808332018-09-20 13:27:10 -050021
22[testenv:pep8]
23basepython = python3
Avishek Dutta18a630b2018-10-31 20:14:12 +000024deps =
25 -r{toxinidir}/test-requirements.txt
26commands =
27 flake8
28 check-uuid --package tungsten_tempest_plugin.tests.api
Avishek Dutadd808332018-09-20 13:27:10 -050029
30[testenv:uuidgen]
31basepython = python3
32commands = check-uuid --package tungsten_tempest_plugin.tests.api --fix
33
34[testenv:venv]
35basepython = python3
36commands = {posargs}
37
38[testenv:cover]
39basepython = python3
40commands = rm -rf *.pyc
41 rm -rf cover
42 rm -f .coverage
43 nosetests {posargs}
44setenv = VIRTUAL_ENV={envdir}
45 NOSE_WITH_COVERAGE=1
46 NOSE_COVER_BRANCHES=1
47 NOSE_COVER_PACKAGE=tungsten_tempest_plugin
48 NOSE_COVER_HTML=1
49 NOSE_COVER_HTML_DIR={toxinidir}/cover
50 NOSE_WHERE=tungsten_tempest_plugin/tests/unit
51whitelist_externals = nosetests
52 rm
53
54[testenv:docs]
55basepython = python3
56deps =
57 -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
58 -r{toxinidir}/requirements.txt
59 -r{toxinidir}/doc/requirements.txt
60commands =
61 rm -rf doc/build
62 sphinx-build -W -b html doc/source doc/build/html
63whitelist_externals = rm
64
65[testenv:releasenotes]
66basepython = python3
67deps =
68 -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
69 -r{toxinidir}/requirements.txt
70 -r{toxinidir}/doc/requirements.txt
71commands =
72 rm -rf releasenotes/build
73 sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
74whitelist_externals = rm
75
76[testenv:debug]
77basepython = python3
78commands = oslo_debug_helper -t tungsten_tempest_plugin/tests {posargs}
79
80[testenv:genconfig]
81basepython = python3
82commands = oslo-config-generator --config-file etc/config-generator.tungsten_tempest.conf
83
84[flake8]
85# [H106] Don't put vim configuration in source files.
86# [H203] Use assertIs(Not)None to check for None.
87# [H204] Use assert(Not)Equal to check for equality.
88# [H205] Use assert(Greater|Less)(Equal) for comparison.
89# [H210] Require 'autospec', 'spec', or 'spec_set' in mock.patch/mock.patch.object calls
90# [H904] Delay string interpolations at logging calls.
Avishek Dutta18a630b2018-10-31 20:14:12 +000091enable-extensions = H106,H203,H204,H205,H210,H904,H306
Avishek Dutadd808332018-09-20 13:27:10 -050092show-source = True
93# E123, E125 skipped as they are invalid PEP-8.
94#
95# H405 is another one that is good as a guideline, but sometimes
96# multiline doc strings just don't have a natural summary
97# line. Rejecting code for this reason is wrong.
Avishek Dutadd808332018-09-20 13:27:10 -050098builtins = _
Sergey Vilgelmc7bc6412018-12-04 09:16:23 -060099exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tungsten_tempest_plugin/services/contrail/json/
Avishek Dutadd808332018-09-20 13:27:10 -0500100
101[hacking]
102local-check-factory = tungsten_tempest_plugin.hacking.checks.factory
103
104[testenv:lower-constraints]
105basepython = python3
106deps =
107 -c{toxinidir}/lower-constraints.txt
108 -r{toxinidir}/test-requirements.txt
109 -r{toxinidir}/requirements.txt