0a73a2d3de
This is a mechanically generated patch to add a unit test job running under Python 3.6 as part of the python3-first goal. See the python3-first goal document for details: https://governance.openstack.org/tc/goals/stein/python3-first.html Change-Id: I15b5f489891aeaa5191dc7400ef10fe7bd60c201 Story: #2002586
90 lines
2.3 KiB
INI
90 lines
2.3 KiB
INI
[tox]
|
||
minversion = 2.0
|
||
envlist = py27,py35,py36,pep8,pylint,docs
|
||
skipsdist = True
|
||
|
||
[testenv]
|
||
usedevelop = True
|
||
deps =
|
||
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
||
-r{toxinidir}/requirements.txt
|
||
-r{toxinidir}/test-requirements.txt
|
||
|
||
install_command = pip install {opts} {packages}
|
||
setenv =
|
||
VIRTUAL_ENV={envdir}
|
||
PYTHON=coverage run --source freezerclient --parallel-mode
|
||
OS_TEST_PATH = ./freezerclient/tests/unit
|
||
commands =
|
||
find . -type f -name "*.py[c|o]" -delete
|
||
stestr run {posargs}
|
||
coverage combine
|
||
coverage html -d cover
|
||
coverage xml -o cover/coverage.xml
|
||
coverage report -m
|
||
rm -f .coverage
|
||
rm -rf .testrepository
|
||
|
||
whitelist_externals =
|
||
find
|
||
coverage
|
||
rm
|
||
|
||
python_files = test_*.py
|
||
norecursedirs = .tox .venv
|
||
|
||
[testenv:venv]
|
||
basepython = python3
|
||
commands = {posargs}
|
||
|
||
[testenv:py27]
|
||
basepython = python2.7
|
||
|
||
[testenv:py35]
|
||
basepython = python3.5
|
||
|
||
[testenv:py36]
|
||
basepython = python3.6
|
||
|
||
[testenv:docs]
|
||
basepython = python3
|
||
deps = -r{toxinidir}/doc/requirements.txt
|
||
commands = sphinx-build -b html doc/source doc/build/html
|
||
|
||
[testenv:pep8]
|
||
basepython = python3
|
||
commands = flake8 freezerclient
|
||
|
||
[testenv:pylint]
|
||
basepython = python3
|
||
commands = pylint --rcfile .pylintrc freezerclient
|
||
|
||
[flake8]
|
||
# Ignored hackings:
|
||
# H104 -> empty file, only comments
|
||
# H202 -> assertRaises(Exception, ...) too broad
|
||
# H404 -> Multi line docstrings should start without a leading new line.
|
||
# H405 -> Multi line docstrings should start with a one line summary followed by an empty line.
|
||
ignore = H104,H202,H404,H405
|
||
# H106: Don’t put vim configuration in source files
|
||
# H203: Use assertIs(Not)None to check for None
|
||
enable-extensions=H106,H203
|
||
show-source = True
|
||
exclude = .venv,.tox,dist,doc,*egg,releasenotes
|
||
|
||
|
||
[testenv:releasenotes]
|
||
basepython = python3
|
||
deps =
|
||
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
||
-r{toxinidir}/requirements.txt
|
||
-r{toxinidir}/doc/requirements.txt
|
||
commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
||
|
||
[testenv:lower-constraints]
|
||
basepython = python3
|
||
deps =
|
||
-c{toxinidir}/lower-constraints.txt
|
||
-r{toxinidir}/test-requirements.txt
|
||
-r{toxinidir}/requirements.txt
|