Chandan Kumar | 5e61987 | 2017-09-07 22:23:55 +0530 | [diff] [blame] | 1 | [tox] |
wu.shiming | d32821b | 2021-07-06 16:10:57 +0800 | [diff] [blame] | 2 | minversion = 3.18.0 |
Brian Haley | 33ef460 | 2018-04-26 14:37:49 -0400 | [diff] [blame] | 3 | envlist = pep8 |
Ghanshyam | 42aac38 | 2020-02-05 15:27:04 -0600 | [diff] [blame] | 4 | ignore_basepython_conflict = True |
Chandan Kumar | 5e61987 | 2017-09-07 22:23:55 +0530 | [diff] [blame] | 5 | |
| 6 | [testenv] |
Rodolfo Alonso Hernandez | d179684 | 2023-01-16 10:40:43 +0100 | [diff] [blame] | 7 | basepython = {env:TOX_PYTHON:python3} |
Chandan Kumar | 5e61987 | 2017-09-07 22:23:55 +0530 | [diff] [blame] | 8 | usedevelop = True |
Chandan Kumar | 5e61987 | 2017-09-07 22:23:55 +0530 | [diff] [blame] | 9 | setenv = |
| 10 | VIRTUAL_ENV={envdir} |
| 11 | PYTHONWARNINGS=default::DeprecationWarning |
Slawek Kaplonski | aa6baae | 2018-05-21 15:20:27 -0700 | [diff] [blame] | 12 | 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 Wiegley | 6b03ab1 | 2019-03-01 10:23:57 -0700 | [diff] [blame] | 15 | deps = |
wu.shiming | d783a82 | 2020-11-17 14:04:29 +0800 | [diff] [blame] | 16 | -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} |
Rodolfo Alonso Hernandez | d179684 | 2023-01-16 10:40:43 +0100 | [diff] [blame] | 17 | -r{toxinidir}/requirements.txt |
Doug Wiegley | 6b03ab1 | 2019-03-01 10:23:57 -0700 | [diff] [blame] | 18 | -r{toxinidir}/test-requirements.txt |
Slawek Kaplonski | aa6baae | 2018-05-21 15:20:27 -0700 | [diff] [blame] | 19 | commands = stestr run --slowest {posargs} |
Chandan Kumar | 5e61987 | 2017-09-07 22:23:55 +0530 | [diff] [blame] | 20 | |
| 21 | [testenv:pep8] |
Dongcan Ye | 6381395 | 2017-11-18 14:22:25 +0800 | [diff] [blame] | 22 | commands = |
Rodolfo Alonso Hernandez | 0302a8e | 2022-12-24 03:52:58 +0100 | [diff] [blame] | 23 | bash ./tools/misc-sanity-checks.sh |
Brian Haley | 33ef460 | 2018-04-26 14:37:49 -0400 | [diff] [blame] | 24 | flake8 |
wu.shiming | d32821b | 2021-07-06 16:10:57 +0800 | [diff] [blame] | 25 | allowlist_externals = |
Rodolfo Alonso Hernandez | 0302a8e | 2022-12-24 03:52:58 +0100 | [diff] [blame] | 26 | bash |
Chandan Kumar | 5e61987 | 2017-09-07 22:23:55 +0530 | [diff] [blame] | 27 | |
| 28 | [testenv:venv] |
| 29 | commands = {posargs} |
| 30 | |
| 31 | [testenv:cover] |
Slawek Kaplonski | aa6baae | 2018-05-21 15:20:27 -0700 | [diff] [blame] | 32 | setenv = |
| 33 | {[testenv]setenv} |
| 34 | PYTHON=coverage run --source neutron_tempest_plugin --parallel-mode |
| 35 | commands = |
| 36 | stestr run --no-subunit-trace {posargs} |
| 37 | coverage combine |
| 38 | coverage html -d cover |
| 39 | coverage xml -o cover/coverage.xml |
Chandan Kumar | 5e61987 | 2017-09-07 22:23:55 +0530 | [diff] [blame] | 40 | |
| 41 | [testenv:docs] |
elajkat | 2903040 | 2021-01-05 12:52:45 +0100 | [diff] [blame] | 42 | deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} |
Elod Illes | f2e985e | 2023-11-06 19:30:29 +0100 | [diff] [blame] | 43 | -r{toxinidir}/requirements.txt |
elajkat | 2903040 | 2021-01-05 12:52:45 +0100 | [diff] [blame] | 44 | -r{toxinidir}/doc/requirements.txt |
Elod Illes | f2e985e | 2023-11-06 19:30:29 +0100 | [diff] [blame] | 45 | commands = |
| 46 | rm -rf doc/source/tests |
| 47 | sphinx-apidoc -f -o doc/source/tests neutron_tempest_plugin |
| 48 | rm -rf doc/build |
| 49 | sphinx-build -W -b html doc/source doc/build/html |
| 50 | allowlist_externals = |
| 51 | rm |
Chandan Kumar | 5e61987 | 2017-09-07 22:23:55 +0530 | [diff] [blame] | 52 | |
| 53 | [testenv:releasenotes] |
elajkat | 2903040 | 2021-01-05 12:52:45 +0100 | [diff] [blame] | 54 | deps = {[testenv:docs]deps} |
Chandan Kumar | 5e61987 | 2017-09-07 22:23:55 +0530 | [diff] [blame] | 55 | commands = |
| 56 | sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html |
| 57 | |
| 58 | [testenv:debug] |
Manjeet Singh Bhatia | 3448e0b | 2018-02-14 10:41:11 -0800 | [diff] [blame] | 59 | commands = oslo_debug_helper -t neutron_tempest_plugin/ {posargs} |
Chandan Kumar | 5e61987 | 2017-09-07 22:23:55 +0530 | [diff] [blame] | 60 | |
| 61 | [flake8] |
Chandan Kumar | 667d3d3 | 2017-09-22 12:24:06 +0530 | [diff] [blame] | 62 | # E126 continuation line over-indented for hanging indent |
| 63 | # E128 continuation line under-indented for visual indent |
| 64 | # E129 visually indented line with same indent as next logical line |
Takashi Kajinami | 435ff6f | 2024-11-16 15:33:27 +0900 | [diff] [blame] | 65 | # I202 Additional newline in a group of imports. |
Chandan Kumar | 667d3d3 | 2017-09-22 12:24:06 +0530 | [diff] [blame] | 66 | # N530 direct neutron imports not allowed |
Bernard Cafarelli | c3bec86 | 2020-09-10 13:59:49 +0200 | [diff] [blame] | 67 | # W504 line break after binary operator |
Takashi Kajinami | 435ff6f | 2024-11-16 15:33:27 +0900 | [diff] [blame] | 68 | ignore = E126,E128,E129,I202,N530,W504 |
Chandan Kumar | 667d3d3 | 2017-09-22 12:24:06 +0530 | [diff] [blame] | 69 | # H106: Don't put vim configuration in source files |
| 70 | # H203: Use assertIs(Not)None to check for None |
Brian Haley | d4fa6dc | 2019-06-27 11:31:55 -0400 | [diff] [blame] | 71 | # H204: Use assert(Not)Equal to check for equality |
| 72 | # H205: Use assert(Greater|Less)(Equal) for comparison |
Chandan Kumar | 667d3d3 | 2017-09-22 12:24:06 +0530 | [diff] [blame] | 73 | # H904: Delay string interpolations at logging calls |
Brian Haley | d4fa6dc | 2019-06-27 11:31:55 -0400 | [diff] [blame] | 74 | enable-extensions = H106,H203,H204,H205,H904 |
Chandan Kumar | 667d3d3 | 2017-09-22 12:24:06 +0530 | [diff] [blame] | 75 | show-source = true |
Brian Haley | 6767cec | 2018-04-10 15:30:23 -0400 | [diff] [blame] | 76 | exclude = ./.*,build,dist,doc,*egg*,releasenotes |
Chandan Kumar | 667d3d3 | 2017-09-22 12:24:06 +0530 | [diff] [blame] | 77 | import-order-style = pep8 |