![Gage Hugo](/assets/img/avatar_default.png)
With the latests changes to os-testr[0] it now expects a .stestr.conf file instead of a .testr.conf file. This change migrates .testr.conf into .stestr.conf and adds the new testing directory into .gitignore. [0] http://lists.openstack.org/pipermail/openstack-dev/2017-September/122135.html Change-Id: I1ff2f4d0c719b0947da70b21cbbfc9e74be76047
79 lines
2.1 KiB
INI
79 lines
2.1 KiB
INI
[tox]
|
|
minversion = 2.3.1
|
|
skipsdist = True
|
|
envlist = docs,py27,pep8
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
install_command = pip install -U {opts} {packages}
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
OS_TEST_PATH=valet/tests/unit
|
|
commands =
|
|
find . -type f -name "*.pyc" -delete
|
|
ostestr --slowest '{posargs}'
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
whitelist_externals =
|
|
bash
|
|
find
|
|
|
|
[testenv:debug]
|
|
commands = oslo_debug_helper -t valet/tests/unit {posargs}
|
|
|
|
[testenv:debug-py27]
|
|
basepython = python2.7
|
|
commands = oslo_debug_helper -t valet/tests/unit {posargs}
|
|
|
|
[testenv:pep8]
|
|
basepython = python2.7
|
|
deps = {[testenv]deps}
|
|
commands = flake8
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:tempest]
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
OS_TEST_PATH=valet/tests/tempest
|
|
commands = python setup.py testr --slowest --testr-args='{posargs}'
|
|
|
|
[testenv:cover]
|
|
# Do NOT run test_coverage_ext tests while gathering coverage.
|
|
# Those tests conflict with coverage.
|
|
setenv =
|
|
{[testenv]setenv}
|
|
PYTHON=coverage run --source valet --parallel-mode
|
|
commands =
|
|
find . -type f -name "*.pyc" -delete
|
|
stestr run {posargs}
|
|
coverage combine
|
|
coverage html -d cover
|
|
coverage xml -o cover/coverage.xml
|
|
|
|
[testenv:docs]
|
|
commands = python setup.py build_sphinx
|
|
|
|
[testenv:releasenotes]
|
|
commands = sphinx-build -a -W -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
[testenv:bandit]
|
|
commands = bandit -r valet -x tests -n 5 -l
|
|
|
|
[testenv:api-ref]
|
|
basepython = python2.7
|
|
commands =
|
|
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
|
|
|
|
[flake8]
|
|
filename = *.py
|
|
show-source = True
|
|
# E123, E125 skipped as they are invalid PEP-8.
|
|
# D100: Missing docstring in public module
|
|
# D101: Missing docstring in public class
|
|
# D102: Missing docstring in public method
|
|
# D103: Missing docstring in public function
|
|
# D104: Missing docstring in public package
|
|
# D203: 1 blank line required before class docstring (deprecated in pep257)
|
|
ignore = D100,D101,D102,D103,D104,D203,E123,E125,E501,H401,H405,H105,H301
|
|
builtins = _
|
|
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build
|