Nishant Kumar | 9d06ea9 | 2017-07-20 12:13:03 -0400 | [diff] [blame] | 1 | [tox] |
Brian Rosmaita | e5ae1ed | 2022-12-21 08:53:24 -0500 | [diff] [blame] | 2 | minversion = 4.0.0 |
| 3 | # specify virtualenv here to keep local runs consistent with the |
| 4 | # gate (it sets the versions of pip, setuptools, and wheel) |
| 5 | requires = virtualenv>=20.17.1 |
Sean McGinnis | 44fed34 | 2017-12-01 16:44:57 -0600 | [diff] [blame] | 6 | envlist = pep8 |
Brian Rosmaita | e0622ed | 2020-01-16 15:15:44 -0500 | [diff] [blame] | 7 | # this allows tox to infer the base python from the environment name |
| 8 | # and override any basepython configured in this file |
| 9 | ignore_basepython_conflict=true |
Nishant Kumar | 9d06ea9 | 2017-07-20 12:13:03 -0400 | [diff] [blame] | 10 | |
| 11 | [testenv] |
Brian Rosmaita | e0622ed | 2020-01-16 15:15:44 -0500 | [diff] [blame] | 12 | basepython = python3 |
Nishant Kumar | 9d06ea9 | 2017-07-20 12:13:03 -0400 | [diff] [blame] | 13 | usedevelop = True |
Nishant Kumar | 9d06ea9 | 2017-07-20 12:13:03 -0400 | [diff] [blame] | 14 | setenv = |
| 15 | VIRTUAL_ENV={envdir} |
| 16 | PYTHONWARNINGS=default::DeprecationWarning |
Luigi Toscano | 7c47222 | 2021-02-09 22:47:08 +0100 | [diff] [blame] | 17 | OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true} |
| 18 | OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true} |
| 19 | OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true} |
Andreas Jaeger | 79d1390 | 2020-05-03 11:04:54 +0200 | [diff] [blame] | 20 | deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} |
chenke | 98e029d | 2019-06-20 21:36:28 +0800 | [diff] [blame] | 21 | -r{toxinidir}/test-requirements.txt |
Luigi Toscano | 7c47222 | 2021-02-09 22:47:08 +0100 | [diff] [blame] | 22 | commands = stestr run --slowest {posargs} |
Nishant Kumar | 9d06ea9 | 2017-07-20 12:13:03 -0400 | [diff] [blame] | 23 | |
| 24 | [testenv:pep8] |
whoami-rajat | 668ce74 | 2022-04-26 12:10:38 +0530 | [diff] [blame] | 25 | commands = |
| 26 | flake8 {posargs} |
| 27 | check-uuid --package cinder_tempest_plugin |
| 28 | |
| 29 | [testenv:uuidgen] |
| 30 | commands = check-uuid --fix --package cinder_tempest_plugin |
Nishant Kumar | 9d06ea9 | 2017-07-20 12:13:03 -0400 | [diff] [blame] | 31 | |
| 32 | [testenv:venv] |
| 33 | commands = {posargs} |
| 34 | |
Nishant Kumar | 9d06ea9 | 2017-07-20 12:13:03 -0400 | [diff] [blame] | 35 | [flake8] |
| 36 | # E123, E125 skipped as they are invalid PEP-8. |
Andreas Jaeger | 79d1390 | 2020-05-03 11:04:54 +0200 | [diff] [blame] | 37 | # W503 line break before binary operator |
| 38 | # W504 line break after binary operator |
Rajat Dhasmana | df4f947 | 2021-01-29 11:41:02 -0500 | [diff] [blame] | 39 | # H101 include name with TODO |
| 40 | # reason: no real benefit |
Nishant Kumar | 9d06ea9 | 2017-07-20 12:13:03 -0400 | [diff] [blame] | 41 | show-source = True |
Rajat Dhasmana | df4f947 | 2021-01-29 11:41:02 -0500 | [diff] [blame] | 42 | ignore = E123,E125,W503,W504,H101 |
Nishant Kumar | 9d06ea9 | 2017-07-20 12:13:03 -0400 | [diff] [blame] | 43 | builtins = _ |
| 44 | exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build |