python-freezerclient/tox.ini

74 lines
1.9 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]
envlist = py27,py35,pep8,pylint,docs
skipsdist = True
[testenv]
usedevelop = True
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
install_command =
{toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
whitelist_externals =
find
coverage
rm
python_files = test_*.py
norecursedirs = .tox .venv
[testenv:venv]
commands = {posargs}
[testenv:py27]
basepython = python2.7
setenv =
OS_TEST_PATH = ./freezerclient/tests/unit
commands =
find . -type f -name "*.py[c|o]" -delete
python setup.py testr --coverage --testr-args="{posargs}"
coverage report -m
rm -f .coverage
rm -rf .testrepository
[testenv:py35]
basepython = python3.5
setenv =
OS_TEST_PATH = ./freezerclient/tests/unit
commands =
find . -type f -name "*.py[c|o]" -delete
python setup.py testr --coverage --testr-args="{posargs}"
coverage report -m
rm -f .coverage
rm -rf .testrepository
[testenv:docs]
commands =
python setup.py build_sphinx
[testenv:pep8]
commands = flake8 freezerclient
[testenv:pylint]
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]
commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html