blob: 8844306b1443485353b012f0d2ab5a9eb670f306 [file] [log] [blame]
Nishant Kumar9d06ea92017-07-20 12:13:03 -04001[tox]
Brian Rosmaitae5ae1ed2022-12-21 08:53:24 -05002minversion = 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)
5requires = virtualenv>=20.17.1
Sean McGinnis44fed342017-12-01 16:44:57 -06006envlist = pep8
Brian Rosmaitae0622ed2020-01-16 15:15:44 -05007# this allows tox to infer the base python from the environment name
8# and override any basepython configured in this file
9ignore_basepython_conflict=true
Nishant Kumar9d06ea92017-07-20 12:13:03 -040010
11[testenv]
Brian Rosmaitae0622ed2020-01-16 15:15:44 -050012basepython = python3
Nishant Kumar9d06ea92017-07-20 12:13:03 -040013usedevelop = True
Nishant Kumar9d06ea92017-07-20 12:13:03 -040014setenv =
15 VIRTUAL_ENV={envdir}
16 PYTHONWARNINGS=default::DeprecationWarning
Luigi Toscano7c472222021-02-09 22:47:08 +010017 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 Jaeger79d13902020-05-03 11:04:54 +020020deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
chenke98e029d2019-06-20 21:36:28 +080021 -r{toxinidir}/test-requirements.txt
Luigi Toscano7c472222021-02-09 22:47:08 +010022commands = stestr run --slowest {posargs}
Nishant Kumar9d06ea92017-07-20 12:13:03 -040023
24[testenv:pep8]
whoami-rajat668ce742022-04-26 12:10:38 +053025commands =
26 flake8 {posargs}
27 check-uuid --package cinder_tempest_plugin
28
29[testenv:uuidgen]
30commands = check-uuid --fix --package cinder_tempest_plugin
Nishant Kumar9d06ea92017-07-20 12:13:03 -040031
32[testenv:venv]
33commands = {posargs}
34
Nishant Kumar9d06ea92017-07-20 12:13:03 -040035[flake8]
36# E123, E125 skipped as they are invalid PEP-8.
Andreas Jaeger79d13902020-05-03 11:04:54 +020037# W503 line break before binary operator
38# W504 line break after binary operator
Rajat Dhasmanadf4f9472021-01-29 11:41:02 -050039# H101 include name with TODO
40# reason: no real benefit
Nishant Kumar9d06ea92017-07-20 12:13:03 -040041show-source = True
Rajat Dhasmanadf4f9472021-01-29 11:41:02 -050042ignore = E123,E125,W503,W504,H101
Nishant Kumar9d06ea92017-07-20 12:13:03 -040043builtins = _
44exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build