blob: 19e006ad61d394e91107e612b28d8405b8d29f4e [file] [log] [blame]
Chandan Kumar5e619872017-09-07 22:23:55 +05301[tox]
Ghanshyam42aac382020-02-05 15:27:04 -06002minversion = 3.1
Brian Haley33ef4602018-04-26 14:37:49 -04003envlist = pep8
Chandan Kumar5e619872017-09-07 22:23:55 +05304skipsdist = True
Ghanshyam42aac382020-02-05 15:27:04 -06005ignore_basepython_conflict = True
Chandan Kumar5e619872017-09-07 22:23:55 +05306
7[testenv]
Ghanshyam42aac382020-02-05 15:27:04 -06008basepython = python3
Chandan Kumar5e619872017-09-07 22:23:55 +05309usedevelop = True
Chandan Kumar5e619872017-09-07 22:23:55 +053010setenv =
11 VIRTUAL_ENV={envdir}
12 PYTHONWARNINGS=default::DeprecationWarning
Slawek Kaplonskiaa6baae2018-05-21 15:20:27 -070013 OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
14 OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true}
15 OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
Doug Wiegley6b03ab12019-03-01 10:23:57 -070016install_command =
17 pip install {opts} {packages}
18deps =
pengyuesheng778cacc2019-09-20 17:50:41 +080019 -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
Doug Wiegley6b03ab12019-03-01 10:23:57 -070020 -r{toxinidir}/test-requirements.txt
Slawek Kaplonskiaa6baae2018-05-21 15:20:27 -070021commands = stestr run --slowest {posargs}
Chandan Kumar5e619872017-09-07 22:23:55 +053022
23[testenv:pep8]
Dongcan Ye63813952017-11-18 14:22:25 +080024commands =
25 sh ./tools/misc-sanity-checks.sh
Brian Haley33ef4602018-04-26 14:37:49 -040026 flake8
Dongcan Ye63813952017-11-18 14:22:25 +080027whitelist_externals =
28 sh
Chandan Kumar5e619872017-09-07 22:23:55 +053029
30[testenv:venv]
31commands = {posargs}
32
33[testenv:cover]
Slawek Kaplonskiaa6baae2018-05-21 15:20:27 -070034setenv =
35 {[testenv]setenv}
36 PYTHON=coverage run --source neutron_tempest_plugin --parallel-mode
37commands =
38 stestr run --no-subunit-trace {posargs}
39 coverage combine
40 coverage html -d cover
41 coverage xml -o cover/coverage.xml
Chandan Kumar5e619872017-09-07 22:23:55 +053042
43[testenv:docs]
44commands = python setup.py build_sphinx
45
46[testenv:releasenotes]
47commands =
48 sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
49
50[testenv:debug]
Manjeet Singh Bhatia3448e0b2018-02-14 10:41:11 -080051commands = oslo_debug_helper -t neutron_tempest_plugin/ {posargs}
Chandan Kumar5e619872017-09-07 22:23:55 +053052
53[flake8]
Chandan Kumar667d3d32017-09-22 12:24:06 +053054# E126 continuation line over-indented for hanging indent
55# E128 continuation line under-indented for visual indent
56# E129 visually indented line with same indent as next logical line
Chandan Kumar667d3d32017-09-22 12:24:06 +053057# N530 direct neutron imports not allowed
Brian Haleyd11f4ec2019-08-13 12:09:57 -040058ignore = E126,E128,E129,N530
Chandan Kumar667d3d32017-09-22 12:24:06 +053059# H106: Don't put vim configuration in source files
60# H203: Use assertIs(Not)None to check for None
Brian Haleyd4fa6dc2019-06-27 11:31:55 -040061# H204: Use assert(Not)Equal to check for equality
62# H205: Use assert(Greater|Less)(Equal) for comparison
Chandan Kumar667d3d32017-09-22 12:24:06 +053063# H904: Delay string interpolations at logging calls
Brian Haleyd4fa6dc2019-06-27 11:31:55 -040064enable-extensions = H106,H203,H204,H205,H904
Chandan Kumar667d3d32017-09-22 12:24:06 +053065show-source = true
Brian Haley6767cec2018-04-10 15:30:23 -040066exclude = ./.*,build,dist,doc,*egg*,releasenotes
Chandan Kumar667d3d32017-09-22 12:24:06 +053067import-order-style = pep8