blob: c2fc078ce8c2b4ba89702ddb8d0ac8d0fb42f393 [file] [log] [blame]
Chandan Kumar5e619872017-09-07 22:23:55 +05301[tox]
wu.shimingd32821b2021-07-06 16:10:57 +08002minversion = 3.18.0
Brian Haley33ef4602018-04-26 14:37:49 -04003envlist = pep8
Ghanshyam42aac382020-02-05 15:27:04 -06004ignore_basepython_conflict = True
Chandan Kumar5e619872017-09-07 22:23:55 +05305
6[testenv]
Rodolfo Alonso Hernandezd1796842023-01-16 10:40:43 +01007basepython = {env:TOX_PYTHON:python3}
Chandan Kumar5e619872017-09-07 22:23:55 +05308usedevelop = True
Chandan Kumar5e619872017-09-07 22:23:55 +05309setenv =
10 VIRTUAL_ENV={envdir}
11 PYTHONWARNINGS=default::DeprecationWarning
Slawek Kaplonskiaa6baae2018-05-21 15:20:27 -070012 OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
13 OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true}
14 OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
Doug Wiegley6b03ab12019-03-01 10:23:57 -070015deps =
wu.shimingd783a822020-11-17 14:04:29 +080016 -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
Rodolfo Alonso Hernandezd1796842023-01-16 10:40:43 +010017 -r{toxinidir}/requirements.txt
Doug Wiegley6b03ab12019-03-01 10:23:57 -070018 -r{toxinidir}/test-requirements.txt
Slawek Kaplonskiaa6baae2018-05-21 15:20:27 -070019commands = stestr run --slowest {posargs}
Chandan Kumar5e619872017-09-07 22:23:55 +053020
21[testenv:pep8]
Dongcan Ye63813952017-11-18 14:22:25 +080022commands =
Rodolfo Alonso Hernandez0302a8e2022-12-24 03:52:58 +010023 bash ./tools/misc-sanity-checks.sh
Brian Haley33ef4602018-04-26 14:37:49 -040024 flake8
wu.shimingd32821b2021-07-06 16:10:57 +080025allowlist_externals =
Rodolfo Alonso Hernandez0302a8e2022-12-24 03:52:58 +010026 bash
Chandan Kumar5e619872017-09-07 22:23:55 +053027
28[testenv:venv]
29commands = {posargs}
30
31[testenv:cover]
Slawek Kaplonskiaa6baae2018-05-21 15:20:27 -070032setenv =
33 {[testenv]setenv}
34 PYTHON=coverage run --source neutron_tempest_plugin --parallel-mode
35commands =
36 stestr run --no-subunit-trace {posargs}
37 coverage combine
38 coverage html -d cover
39 coverage xml -o cover/coverage.xml
Chandan Kumar5e619872017-09-07 22:23:55 +053040
41[testenv:docs]
elajkat29030402021-01-05 12:52:45 +010042deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
43 -r{toxinidir}/doc/requirements.txt
Andreas Jaeger5719f992020-04-19 09:52:11 +020044commands = sphinx-build -W -b html doc/source doc/build/html
Chandan Kumar5e619872017-09-07 22:23:55 +053045
46[testenv:releasenotes]
elajkat29030402021-01-05 12:52:45 +010047deps = {[testenv:docs]deps}
Chandan Kumar5e619872017-09-07 22:23:55 +053048commands =
49 sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
50
51[testenv:debug]
Manjeet Singh Bhatia3448e0b2018-02-14 10:41:11 -080052commands = oslo_debug_helper -t neutron_tempest_plugin/ {posargs}
Chandan Kumar5e619872017-09-07 22:23:55 +053053
54[flake8]
Chandan Kumar667d3d32017-09-22 12:24:06 +053055# E126 continuation line over-indented for hanging indent
56# E128 continuation line under-indented for visual indent
57# E129 visually indented line with same indent as next logical line
Chandan Kumar667d3d32017-09-22 12:24:06 +053058# N530 direct neutron imports not allowed
Bernard Cafarellic3bec862020-09-10 13:59:49 +020059# W504 line break after binary operator
60ignore = E126,E128,E129,N530,W504
Chandan Kumar667d3d32017-09-22 12:24:06 +053061# H106: Don't put vim configuration in source files
62# H203: Use assertIs(Not)None to check for None
Brian Haleyd4fa6dc2019-06-27 11:31:55 -040063# H204: Use assert(Not)Equal to check for equality
64# H205: Use assert(Greater|Less)(Equal) for comparison
Chandan Kumar667d3d32017-09-22 12:24:06 +053065# H904: Delay string interpolations at logging calls
Brian Haleyd4fa6dc2019-06-27 11:31:55 -040066enable-extensions = H106,H203,H204,H205,H904
Chandan Kumar667d3d32017-09-22 12:24:06 +053067show-source = true
Brian Haley6767cec2018-04-10 15:30:23 -040068exclude = ./.*,build,dist,doc,*egg*,releasenotes
Chandan Kumar667d3d32017-09-22 12:24:06 +053069import-order-style = pep8