89 lines
2.8 KiB
INI
89 lines
2.8 KiB
INI
[tox]
|
|
envlist = py37,py36,py27,pep8
|
|
minversion = 2.0
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
install_command = pip install {opts} {packages}
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
DISCOVER_DIRECTORY=sahara_plugin_spark/tests/unit
|
|
deps =
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands = stestr run {posargs}
|
|
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
|
|
|
[testenv:debug-py27]
|
|
basepython = python2.7
|
|
commands = oslo_debug_helper -t sahara_plugin_spark/tests/unit {posargs}
|
|
|
|
[testenv:debug-py36]
|
|
basepython = python3.6
|
|
commands = oslo_debug_helper -t sahara_plugin_spark/tests/unit {posargs}
|
|
|
|
[testenv:pep8]
|
|
basepython = python3
|
|
deps =
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
-r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
flake8 {posargs}
|
|
doc8 doc/source
|
|
|
|
[testenv:venv]
|
|
basepython = python3
|
|
commands = {posargs}
|
|
|
|
[testenv:docs]
|
|
basepython = python3
|
|
deps =
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
|
|
-r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
rm -rf doc/html doc/build
|
|
sphinx-build -W -b html doc/source doc/build/html
|
|
whitelist_externals =
|
|
rm
|
|
|
|
[testenv:releasenotes]
|
|
basepython = python3
|
|
deps =
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
|
|
-r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
rm -rf releasenotes/build releasenotes/html
|
|
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
whitelist_externals = rm
|
|
|
|
[testenv:debug]
|
|
basepython = python3
|
|
# It runs tests from the specified dir (default is sahara_plugin_spark/tests)
|
|
# in interactive mode, so, you could use pbr for tests debug.
|
|
# Example usage: tox -e debug -- -t sahara_plugin_spark/tests/unit some.test.path
|
|
# https://docs.openstack.org/oslotest/latest/features.html#debugging-with-oslo-debug-helper
|
|
commands = oslo_debug_helper -t sahara_plugin_spark/tests/unit {posargs}
|
|
|
|
[flake8]
|
|
show-source = true
|
|
builtins = _
|
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools
|
|
# [H904] Delay string interpolations at logging calls
|
|
# [H106] Don't put vim configuration in source files
|
|
# [H203] Use assertIs(Not)None to check for None.
|
|
# [H204] Use assert(Not)Equal to check for equality
|
|
# [H205] Use assert(Greater|Less)(Equal) for comparison
|
|
enable-extensions=H904,H106,H203,H204,H205
|
|
|
|
[testenv:lower-constraints]
|
|
basepython = python3
|
|
deps =
|
|
-c{toxinidir}/lower-constraints.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/doc/requirements.txt
|