blob: e209d584d6a11d34a57ad009c807827e61188363 [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
Chandan Kumar5e619872017-09-07 22:23:55 +05304
5[testenv]
6usedevelop = True
Chandan Kumar5e619872017-09-07 22:23:55 +05307setenv =
8 VIRTUAL_ENV={envdir}
9 PYTHONWARNINGS=default::DeprecationWarning
Slawek Kaplonskiaa6baae2018-05-21 15:20:27 -070010 OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
11 OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true}
12 OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
Doug Wiegley6b03ab12019-03-01 10:23:57 -070013deps =
wu.shimingd783a822020-11-17 14:04:29 +080014 -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
Rodolfo Alonso Hernandezd1796842023-01-16 10:40:43 +010015 -r{toxinidir}/requirements.txt
Doug Wiegley6b03ab12019-03-01 10:23:57 -070016 -r{toxinidir}/test-requirements.txt
Slawek Kaplonskiaa6baae2018-05-21 15:20:27 -070017commands = stestr run --slowest {posargs}
Chandan Kumar5e619872017-09-07 22:23:55 +053018
19[testenv:pep8]
Dongcan Ye63813952017-11-18 14:22:25 +080020commands =
Rodolfo Alonso Hernandez0302a8e2022-12-24 03:52:58 +010021 bash ./tools/misc-sanity-checks.sh
Brian Haley33ef4602018-04-26 14:37:49 -040022 flake8
wu.shimingd32821b2021-07-06 16:10:57 +080023allowlist_externals =
Rodolfo Alonso Hernandez0302a8e2022-12-24 03:52:58 +010024 bash
Chandan Kumar5e619872017-09-07 22:23:55 +053025
26[testenv:venv]
27commands = {posargs}
28
29[testenv:cover]
Slawek Kaplonskiaa6baae2018-05-21 15:20:27 -070030setenv =
31 {[testenv]setenv}
32 PYTHON=coverage run --source neutron_tempest_plugin --parallel-mode
33commands =
34 stestr run --no-subunit-trace {posargs}
35 coverage combine
36 coverage html -d cover
37 coverage xml -o cover/coverage.xml
Chandan Kumar5e619872017-09-07 22:23:55 +053038
39[testenv:docs]
elajkat29030402021-01-05 12:52:45 +010040deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
Elod Illesf2e985e2023-11-06 19:30:29 +010041 -r{toxinidir}/requirements.txt
elajkat29030402021-01-05 12:52:45 +010042 -r{toxinidir}/doc/requirements.txt
Elod Illesf2e985e2023-11-06 19:30:29 +010043commands =
44 rm -rf doc/source/tests
45 sphinx-apidoc -f -o doc/source/tests neutron_tempest_plugin
46 rm -rf doc/build
47 sphinx-build -W -b html doc/source doc/build/html
48allowlist_externals =
49 rm
Chandan Kumar5e619872017-09-07 22:23:55 +053050
51[testenv:releasenotes]
elajkat29030402021-01-05 12:52:45 +010052deps = {[testenv:docs]deps}
Chandan Kumar5e619872017-09-07 22:23:55 +053053commands =
54 sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
55
56[testenv:debug]
Manjeet Singh Bhatia3448e0b2018-02-14 10:41:11 -080057commands = oslo_debug_helper -t neutron_tempest_plugin/ {posargs}
Chandan Kumar5e619872017-09-07 22:23:55 +053058
59[flake8]
Chandan Kumar667d3d32017-09-22 12:24:06 +053060# E126 continuation line over-indented for hanging indent
61# E128 continuation line under-indented for visual indent
62# E129 visually indented line with same indent as next logical line
Takashi Kajinami435ff6f2024-11-16 15:33:27 +090063# I202 Additional newline in a group of imports.
Chandan Kumar667d3d32017-09-22 12:24:06 +053064# N530 direct neutron imports not allowed
Rodolfo Alonso Hernandez80df3662025-08-28 09:04:14 +000065# N535 prevent eventlet library import
Bernard Cafarellic3bec862020-09-10 13:59:49 +020066# W504 line break after binary operator
Rodolfo Alonso Hernandez80df3662025-08-28 09:04:14 +000067ignore = E126,E128,E129,I202,N530,N535,W504
Chandan Kumar667d3d32017-09-22 12:24:06 +053068# H106: Don't put vim configuration in source files
69# H203: Use assertIs(Not)None to check for None
Brian Haleyd4fa6dc2019-06-27 11:31:55 -040070# H204: Use assert(Not)Equal to check for equality
71# H205: Use assert(Greater|Less)(Equal) for comparison
Chandan Kumar667d3d32017-09-22 12:24:06 +053072# H904: Delay string interpolations at logging calls
Brian Haleyd4fa6dc2019-06-27 11:31:55 -040073enable-extensions = H106,H203,H204,H205,H904
Chandan Kumar667d3d32017-09-22 12:24:06 +053074show-source = true
Brian Haley6767cec2018-04-10 15:30:23 -040075exclude = ./.*,build,dist,doc,*egg*,releasenotes
Chandan Kumar667d3d32017-09-22 12:24:06 +053076import-order-style = pep8