python-freezerclient/tox.ini

90 lines
2.2 KiB
INI
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[tox]
minversion = 2.0
envlist = py27,py37,pep8,pylint,docs
skipsdist = True
[testenv]
usedevelop = True
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-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:py36]
basepython = python3.6
[testenv:py37]
basepython = python3.7
[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: Dont 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://releases.openstack.org/constraints/upper/master}
-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