2012-02-29 16:42:26 -05:00
|
|
|
[tox]
|
2021-11-24 19:27:19 -06:00
|
|
|
envlist = py39,pep8
|
2018-10-21 02:11:13 +00:00
|
|
|
minversion = 2.0
|
2013-12-09 14:27:57 +00:00
|
|
|
skipsdist = True
|
2012-02-29 16:42:26 -05:00
|
|
|
|
|
|
|
[testenv]
|
2013-12-09 14:27:57 +00:00
|
|
|
usedevelop = True
|
2019-11-15 10:18:38 +01:00
|
|
|
setenv = OS_STDOUT_NOCAPTURE=False
|
2012-12-24 22:50:58 -06:00
|
|
|
OS_STDERR_NOCAPTURE=False
|
|
|
|
|
2021-05-26 09:52:47 +08:00
|
|
|
# Nowadays, TOX_CONSTRAINTS_FILE should be used, but some older scripts might
|
|
|
|
# still be using UPPER_CONSTRAINTS_FILE, so we check both variables and use the
|
|
|
|
# first one that is defined. If none of them is defined, we fallback to the
|
|
|
|
# default value.
|
2017-12-02 09:24:03 +01:00
|
|
|
deps =
|
2021-05-26 09:52:47 +08:00
|
|
|
-c{env:TOX_CONSTRAINTS_FILE:{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}}
|
2017-12-02 09:24:03 +01:00
|
|
|
-r{toxinidir}/requirements.txt
|
2013-05-29 17:23:30 +08:00
|
|
|
-r{toxinidir}/test-requirements.txt
|
2018-05-22 03:26:21 +00:00
|
|
|
commands = stestr run --slowest {posargs}
|
2012-02-29 14:14:14 -08:00
|
|
|
|
2012-06-07 14:51:29 -07:00
|
|
|
[testenv:pep8]
|
2018-06-06 17:58:17 -04:00
|
|
|
basepython = python3
|
2013-05-18 08:29:02 -07:00
|
|
|
commands = flake8
|
2012-02-29 14:14:14 -08:00
|
|
|
|
2012-06-07 14:51:29 -07:00
|
|
|
[testenv:venv]
|
2018-06-06 17:58:17 -04:00
|
|
|
basepython = python3
|
2012-02-29 14:14:14 -08:00
|
|
|
commands = {posargs}
|
2012-12-24 22:50:58 -06:00
|
|
|
|
2016-03-16 16:34:46 -05:00
|
|
|
[pbr]
|
|
|
|
warnerror = True
|
|
|
|
|
2015-04-17 12:48:39 +00:00
|
|
|
[testenv:functional]
|
2015-08-26 12:33:06 +00:00
|
|
|
# See glanceclient/tests/functional/README.rst
|
|
|
|
# for information on running the functional tests.
|
2015-04-17 12:48:39 +00:00
|
|
|
setenv =
|
2018-03-15 20:32:40 -04:00
|
|
|
OS_TEST_PATH = ./glanceclient/tests/functional/v2
|
|
|
|
OS_TESTENV_NAME = {envname}
|
|
|
|
whitelist_externals =
|
|
|
|
bash
|
|
|
|
commands =
|
|
|
|
bash tools/fix_ca_bundle.sh
|
2018-05-22 03:26:21 +00:00
|
|
|
stestr run --slowest {posargs}
|
2018-03-15 20:32:40 -04:00
|
|
|
|
2012-12-24 22:50:58 -06:00
|
|
|
[testenv:cover]
|
2018-06-06 17:58:17 -04:00
|
|
|
basepython = python3
|
2018-05-22 03:26:21 +00:00
|
|
|
setenv =
|
|
|
|
PYTHON=coverage run --source glanceclient --parallel-mode
|
|
|
|
commands =
|
|
|
|
stestr run {posargs}
|
|
|
|
coverage combine
|
|
|
|
coverage html -d cover
|
|
|
|
coverage xml -o cover/coverage.xml
|
2012-12-24 22:50:58 -06:00
|
|
|
|
2014-07-24 17:44:22 -04:00
|
|
|
[testenv:docs]
|
2018-06-06 17:58:17 -04:00
|
|
|
basepython = python3
|
2017-12-29 13:53:24 +08:00
|
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
|
|
commands =
|
|
|
|
sphinx-build -W -b html doc/source doc/build/html
|
2014-07-24 17:44:22 -04:00
|
|
|
|
2016-02-11 11:17:01 +03:00
|
|
|
[testenv:releasenotes]
|
2018-06-06 17:58:17 -04:00
|
|
|
basepython = python3
|
2021-05-26 09:52:47 +08:00
|
|
|
# Nowadays, TOX_CONSTRAINTS_FILE should be used, but some older scripts might
|
|
|
|
# still be using UPPER_CONSTRAINTS_FILE, so we check both variables and use the
|
|
|
|
# first one that is defined. If none of them is defined, we fallback to the
|
|
|
|
# default value.
|
2019-01-09 18:02:09 +00:00
|
|
|
deps =
|
2021-05-26 09:52:47 +08:00
|
|
|
-c{env:TOX_CONSTRAINTS_FILE:{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}}
|
2019-01-09 18:02:09 +00:00
|
|
|
-r{toxinidir}/doc/requirements.txt
|
2017-12-29 13:53:24 +08:00
|
|
|
commands =
|
|
|
|
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
2016-02-11 11:17:01 +03:00
|
|
|
|
2013-05-18 08:29:02 -07:00
|
|
|
[flake8]
|
2019-03-06 22:41:58 +08:00
|
|
|
# E731 skipped as assign a lambda expression
|
2020-04-02 15:40:21 +02:00
|
|
|
# W504 line break after binary operator
|
2020-07-27 20:31:11 +02:00
|
|
|
ignore = E731,W504
|
2013-05-18 08:29:02 -07:00
|
|
|
show-source = True
|
2016-11-03 17:23:41 +05:30
|
|
|
exclude = .venv*,.tox,dist,*egg,build,.git,doc,*lib/python*,.update-venv
|
2015-05-19 19:59:06 -05:00
|
|
|
|
|
|
|
[hacking]
|
2020-06-15 21:28:17 +02:00
|
|
|
import_exceptions = glanceclient._i18n
|
2018-03-22 17:47:05 -04:00
|
|
|
|
|
|
|
[testenv:lower-constraints]
|
|
|
|
basepython = python3
|
|
|
|
deps =
|
|
|
|
-c{toxinidir}/lower-constraints.txt
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
-r{toxinidir}/requirements.txt
|