blob: b7f30986717ffd4afee2ae489900f1868cbf6956 [file] [log] [blame]
Kiall Mac Innes25fb29e2016-04-07 08:07:04 +01001[tox]
Ghanshyam3862c0a2020-01-23 17:17:45 -06002minversion = 3.1.1
3envlist = py37,pep8
Kiall Mac Innes25fb29e2016-04-07 08:07:04 +01004skipsdist = True
Ghanshyam3862c0a2020-01-23 17:17:45 -06005ignore_basepython_conflict = True
Kiall Mac Innes25fb29e2016-04-07 08:07:04 +01006
7[testenv]
Ghanshyam3862c0a2020-01-23 17:17:45 -06008basepython = python3
Kiall Mac Innes25fb29e2016-04-07 08:07:04 +01009usedevelop = True
Andreas Jaeger7cd8d5a2017-12-02 07:11:16 +010010install_command = pip install {opts} {packages}
11deps =
inspurericzhang21667762019-05-24 14:21:52 +080012 -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
Andreas Jaeger7cd8d5a2017-12-02 07:11:16 +010013 -r{toxinidir}/requirements.txt
Kiall Mac Innes25fb29e2016-04-07 08:07:04 +010014 -r{toxinidir}/test-requirements.txt
15setenv =
Tony Breedsde55ca22016-12-20 15:42:54 +110016 VIRTUAL_ENV={envdir}
Kiall Mac Innes25fb29e2016-04-07 08:07:04 +010017 PYTHONDONTWRITEBYTECODE=1
18whitelist_externals = sh
19 find
20 rm
21commands =
22 find . -type f -name "*.pyc" -delete
Vu Cong Tuanf348bfe2018-07-12 14:12:34 +070023 stestr run {posargs}
Kiall Mac Innes25fb29e2016-04-07 08:07:04 +010024passenv = http_proxy
25 HTTP_PROXY
26 https_proxy
27 HTTPS_PROXY
28 no_proxy
29 NO_PROXY
30 OS_DEBUG
31 OS_LOG_CAPTURE
32 OS_STDERR_CAPTURE
33 OS_STDOUT_CAPTURE
34
35[testenv:pep8]
Kiall Mac Innes25fb29e2016-04-07 08:07:04 +010036commands = sh tools/pretty_flake8.sh
37
Graham Hayesc392cf92017-02-23 16:06:04 -050038
39[testenv:docs]
40commands = rm -rf doc/build
41 sphinx-build -E -W -b html doc/source doc/build/html
42
Kiall Mac Innes25fb29e2016-04-07 08:07:04 +010043[testenv:bashate]
44deps = bashate
45whitelist_externals = bash
46commands = bash -c "find {toxinidir}/devstack \
47 -not \( -type d -name .?\* -prune \) \
48 -not \( -type d -name doc -prune \) \
49 -type f \
50 -not -name \*~ \
51 -not -name \*.md \
52 \( \
53 -name \*.sh -or \
54 -name \*rc -or \
55 -name functions\* -or \
56 -wholename \*/lib/\* \
57 \) \
58 -print0 | xargs -0 bashate -v"
59
60[testenv:pip-check-reqs]
61# do not install test-requirements as that will pollute the virtualenv for
62# determining missing packages
63# this also means that pip-missing-reqs must be installed separately, outside
64# of the requirements.txt files
65deps = pip-check-reqs
66 -r{toxinidir}/requirements.txt
67commands=pip-missing-reqs -d --ignore-file=designate/tests/* designate
68
69[testenv:venv]
70commands = {posargs}
71
72[flake8]
73# ignored flake8 codes:
74# H302 import only modules
75# H306 imports not in alphabetical order
76# H402 one line docstring needs punctuation
77# H404 multi line docstring should start with a summary
78# H405 multi line docstring summary not separated with an empty line
79# H904 Wrap long lines in parentheses instead of a backslash
80# E126 continuation line over-indented for hanging indent
81# E128 continuation line under-indented for visual indent
Andreas Jaeger5fb81fa2020-03-29 15:37:12 +020082# W504 line break after binary operator
83ignore = H302,H306,H402,H404,H405,H904,E126,E128,W504
Kiall Mac Innes25fb29e2016-04-07 08:07:04 +010084exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*openstack/deprecated*,*lib/python*,*egg,build,tools,.ropeproject
Kiall Mac Innesa17f2332016-08-25 13:34:42 +010085
Andreas Jaeger5fb81fa2020-03-29 15:37:12 +020086[flake8:local-plugins]
87extension =
88 T102 = tempest.hacking.checks:import_no_clients_in_api_and_scenario_tests
89 T104 = tempest.hacking.checks:scenario_tests_need_service_tags
90 T105 = tempest.hacking.checks:no_setup_teardown_class_for_tests
91 T107 = tempest.hacking.checks:service_tags_not_in_module_path
92 T108 = tempest.hacking.checks:no_hyphen_at_end_of_rand_name
93 N322 = tempest.hacking.checks:no_mutable_default_args
94 T109 = tempest.hacking.checks:no_testtools_skip_decorator
95 T110 = tempest.hacking.checks:get_resources_on_service_clients
96 T111 = tempest.hacking.checks:delete_resources_on_service_clients
97 T112 = tempest.hacking.checks:dont_import_local_tempest_into_lib
98 T113 = tempest.hacking.checks:dont_use_config_in_tempest_lib
99 T114 = tempest.hacking.checks:use_rand_uuid_instead_of_uuid4