Chandan Kumar | 5e61987 | 2017-09-07 22:23:55 +0530 | [diff] [blame] | 1 | [tox] |
Ghanshyam | 42aac38 | 2020-02-05 15:27:04 -0600 | [diff] [blame^] | 2 | minversion = 3.1 |
Brian Haley | 33ef460 | 2018-04-26 14:37:49 -0400 | [diff] [blame] | 3 | envlist = pep8 |
Chandan Kumar | 5e61987 | 2017-09-07 22:23:55 +0530 | [diff] [blame] | 4 | skipsdist = True |
Ghanshyam | 42aac38 | 2020-02-05 15:27:04 -0600 | [diff] [blame^] | 5 | ignore_basepython_conflict = True |
Chandan Kumar | 5e61987 | 2017-09-07 22:23:55 +0530 | [diff] [blame] | 6 | |
| 7 | [testenv] |
Ghanshyam | 42aac38 | 2020-02-05 15:27:04 -0600 | [diff] [blame^] | 8 | basepython = python3 |
Chandan Kumar | 5e61987 | 2017-09-07 22:23:55 +0530 | [diff] [blame] | 9 | usedevelop = True |
Chandan Kumar | 5e61987 | 2017-09-07 22:23:55 +0530 | [diff] [blame] | 10 | setenv = |
| 11 | VIRTUAL_ENV={envdir} |
| 12 | PYTHONWARNINGS=default::DeprecationWarning |
Slawek Kaplonski | aa6baae | 2018-05-21 15:20:27 -0700 | [diff] [blame] | 13 | 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 Wiegley | 6b03ab1 | 2019-03-01 10:23:57 -0700 | [diff] [blame] | 16 | install_command = |
| 17 | pip install {opts} {packages} |
| 18 | deps = |
pengyuesheng | 778cacc | 2019-09-20 17:50:41 +0800 | [diff] [blame] | 19 | -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} |
Doug Wiegley | 6b03ab1 | 2019-03-01 10:23:57 -0700 | [diff] [blame] | 20 | -r{toxinidir}/test-requirements.txt |
Slawek Kaplonski | aa6baae | 2018-05-21 15:20:27 -0700 | [diff] [blame] | 21 | commands = stestr run --slowest {posargs} |
Chandan Kumar | 5e61987 | 2017-09-07 22:23:55 +0530 | [diff] [blame] | 22 | |
| 23 | [testenv:pep8] |
Dongcan Ye | 6381395 | 2017-11-18 14:22:25 +0800 | [diff] [blame] | 24 | commands = |
| 25 | sh ./tools/misc-sanity-checks.sh |
Brian Haley | 33ef460 | 2018-04-26 14:37:49 -0400 | [diff] [blame] | 26 | flake8 |
Dongcan Ye | 6381395 | 2017-11-18 14:22:25 +0800 | [diff] [blame] | 27 | whitelist_externals = |
| 28 | sh |
Chandan Kumar | 5e61987 | 2017-09-07 22:23:55 +0530 | [diff] [blame] | 29 | |
| 30 | [testenv:venv] |
| 31 | commands = {posargs} |
| 32 | |
| 33 | [testenv:cover] |
Slawek Kaplonski | aa6baae | 2018-05-21 15:20:27 -0700 | [diff] [blame] | 34 | setenv = |
| 35 | {[testenv]setenv} |
| 36 | PYTHON=coverage run --source neutron_tempest_plugin --parallel-mode |
| 37 | commands = |
| 38 | stestr run --no-subunit-trace {posargs} |
| 39 | coverage combine |
| 40 | coverage html -d cover |
| 41 | coverage xml -o cover/coverage.xml |
Chandan Kumar | 5e61987 | 2017-09-07 22:23:55 +0530 | [diff] [blame] | 42 | |
| 43 | [testenv:docs] |
| 44 | commands = python setup.py build_sphinx |
| 45 | |
| 46 | [testenv:releasenotes] |
| 47 | commands = |
| 48 | sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html |
| 49 | |
| 50 | [testenv:debug] |
Manjeet Singh Bhatia | 3448e0b | 2018-02-14 10:41:11 -0800 | [diff] [blame] | 51 | commands = oslo_debug_helper -t neutron_tempest_plugin/ {posargs} |
Chandan Kumar | 5e61987 | 2017-09-07 22:23:55 +0530 | [diff] [blame] | 52 | |
| 53 | [flake8] |
Chandan Kumar | 667d3d3 | 2017-09-22 12:24:06 +0530 | [diff] [blame] | 54 | # 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 Kumar | 667d3d3 | 2017-09-22 12:24:06 +0530 | [diff] [blame] | 57 | # N530 direct neutron imports not allowed |
Brian Haley | d11f4ec | 2019-08-13 12:09:57 -0400 | [diff] [blame] | 58 | ignore = E126,E128,E129,N530 |
Chandan Kumar | 667d3d3 | 2017-09-22 12:24:06 +0530 | [diff] [blame] | 59 | # H106: Don't put vim configuration in source files |
| 60 | # H203: Use assertIs(Not)None to check for None |
Brian Haley | d4fa6dc | 2019-06-27 11:31:55 -0400 | [diff] [blame] | 61 | # H204: Use assert(Not)Equal to check for equality |
| 62 | # H205: Use assert(Greater|Less)(Equal) for comparison |
Chandan Kumar | 667d3d3 | 2017-09-22 12:24:06 +0530 | [diff] [blame] | 63 | # H904: Delay string interpolations at logging calls |
Brian Haley | d4fa6dc | 2019-06-27 11:31:55 -0400 | [diff] [blame] | 64 | enable-extensions = H106,H203,H204,H205,H904 |
Chandan Kumar | 667d3d3 | 2017-09-22 12:24:06 +0530 | [diff] [blame] | 65 | show-source = true |
Brian Haley | 6767cec | 2018-04-10 15:30:23 -0400 | [diff] [blame] | 66 | exclude = ./.*,build,dist,doc,*egg*,releasenotes |
Chandan Kumar | 667d3d3 | 2017-09-22 12:24:06 +0530 | [diff] [blame] | 67 | import-order-style = pep8 |