blob: 760cc47c84bf3ee2b7870307b695cb26f3e238cf [file] [log] [blame]
Chandan Kumar5e619872017-09-07 22:23:55 +05301[tox]
Ghanshyam42aac382020-02-05 15:27:04 -06002minversion = 3.1
Brian Haley33ef4602018-04-26 14:37:49 -04003envlist = pep8
Chandan Kumar5e619872017-09-07 22:23:55 +05304skipsdist = True
Ghanshyam42aac382020-02-05 15:27:04 -06005ignore_basepython_conflict = True
Chandan Kumar5e619872017-09-07 22:23:55 +05306
7[testenv]
Ghanshyam42aac382020-02-05 15:27:04 -06008basepython = python3
Chandan Kumar5e619872017-09-07 22:23:55 +05309usedevelop = True
Chandan Kumar5e619872017-09-07 22:23:55 +053010setenv =
11 VIRTUAL_ENV={envdir}
12 PYTHONWARNINGS=default::DeprecationWarning
Slawek Kaplonskiaa6baae2018-05-21 15:20:27 -070013 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 Wiegley6b03ab12019-03-01 10:23:57 -070016deps =
pengyuesheng778cacc2019-09-20 17:50:41 +080017 -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
Doug Wiegley6b03ab12019-03-01 10:23:57 -070018 -r{toxinidir}/test-requirements.txt
Slawek Kaplonskiaa6baae2018-05-21 15:20:27 -070019commands = stestr run --slowest {posargs}
Chandan Kumar5e619872017-09-07 22:23:55 +053020
21[testenv:pep8]
Dongcan Ye63813952017-11-18 14:22:25 +080022commands =
23 sh ./tools/misc-sanity-checks.sh
Brian Haley33ef4602018-04-26 14:37:49 -040024 flake8
Dongcan Ye63813952017-11-18 14:22:25 +080025whitelist_externals =
26 sh
Chandan Kumar5e619872017-09-07 22:23:55 +053027
28[testenv:venv]
29commands = {posargs}
30
31[testenv:cover]
Slawek Kaplonskiaa6baae2018-05-21 15:20:27 -070032setenv =
33 {[testenv]setenv}
34 PYTHON=coverage run --source neutron_tempest_plugin --parallel-mode
35commands =
36 stestr run --no-subunit-trace {posargs}
37 coverage combine
38 coverage html -d cover
39 coverage xml -o cover/coverage.xml
Chandan Kumar5e619872017-09-07 22:23:55 +053040
41[testenv:docs]
Andreas Jaeger5719f992020-04-19 09:52:11 +020042commands = sphinx-build -W -b html doc/source doc/build/html
Chandan Kumar5e619872017-09-07 22:23:55 +053043
44[testenv:releasenotes]
45commands =
46 sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
47
48[testenv:debug]
Manjeet Singh Bhatia3448e0b2018-02-14 10:41:11 -080049commands = oslo_debug_helper -t neutron_tempest_plugin/ {posargs}
Chandan Kumar5e619872017-09-07 22:23:55 +053050
51[flake8]
Chandan Kumar667d3d32017-09-22 12:24:06 +053052# E126 continuation line over-indented for hanging indent
53# E128 continuation line under-indented for visual indent
54# E129 visually indented line with same indent as next logical line
Chandan Kumar667d3d32017-09-22 12:24:06 +053055# N530 direct neutron imports not allowed
Brian Haleyd11f4ec2019-08-13 12:09:57 -040056ignore = E126,E128,E129,N530
Chandan Kumar667d3d32017-09-22 12:24:06 +053057# H106: Don't put vim configuration in source files
58# H203: Use assertIs(Not)None to check for None
Brian Haleyd4fa6dc2019-06-27 11:31:55 -040059# H204: Use assert(Not)Equal to check for equality
60# H205: Use assert(Greater|Less)(Equal) for comparison
Chandan Kumar667d3d32017-09-22 12:24:06 +053061# H904: Delay string interpolations at logging calls
Brian Haleyd4fa6dc2019-06-27 11:31:55 -040062enable-extensions = H106,H203,H204,H205,H904
Chandan Kumar667d3d32017-09-22 12:24:06 +053063show-source = true
Brian Haley6767cec2018-04-10 15:30:23 -040064exclude = ./.*,build,dist,doc,*egg*,releasenotes
Chandan Kumar667d3d32017-09-22 12:24:06 +053065import-order-style = pep8