9867828c8e
Some of the available checks are disabled by default, like: [H106] Don’t put vim configuration in source files [H203] Use assertIs(Not)None to check for None Change-Id: Ifed3a0b3514ac10a4c2b49b904f39a3faf2f15b5
88 lines
2.2 KiB
INI
88 lines
2.2 KiB
INI
[tox]
|
|
envlist = py{35,27},pep8,pylint,docs
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
deps =
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
passenv =
|
|
FREEZER_TEST_SSH_KEY
|
|
FREEZER_TEST_SSH_USERNAME
|
|
FREEZER_TEST_SSH_HOST
|
|
FREEZER_TEST_CONTAINER
|
|
FREEZER_TEST_OS_TENANT_NAME
|
|
FREEZER_TEST_OS_USERNAME
|
|
FREEZER_TEST_OS_REGION_NAME
|
|
FREEZER_TEST_OS_PASSWORD
|
|
FREEZER_TEST_OS_AUTH_URL
|
|
FREEZER_TEST_NO_LVM
|
|
http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
|
|
|
install_command = pip install -c{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 = ./freezer/tests/unit
|
|
commands =
|
|
find . -type f -name "*.pyc" -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 = ./freezer/tests/unit
|
|
commands =
|
|
find . -type f -name "*.pyc" -delete
|
|
python setup.py testr --coverage --testr-args="{posargs}"
|
|
coverage report -m
|
|
rm -f .coverage
|
|
rm -rf .testrepository
|
|
|
|
[testenv:docs]
|
|
whitelist_externals = rm
|
|
bash
|
|
commands =
|
|
python setup.py build_sphinx
|
|
sphinx-build -a -E -W -d install-guide/build/doctrees -b html install-guide/source install-guide/build/html
|
|
|
|
[testenv:pep8]
|
|
commands = flake8 freezer
|
|
|
|
[testenv:pylint]
|
|
commands = pylint --rcfile .pylintrc freezer
|
|
|
|
[flake8]
|
|
ignore = H405,H404,H403,H401
|
|
show-source = True
|
|
enable-extensions = H203,H106
|
|
exclude = .venv,.tox,dist,doc,test,*egg,releasenotes
|
|
|
|
[testenv:install-guide]
|
|
whitelist_externals = rm
|
|
bash
|
|
commands =
|
|
rm -rf install-guide/build/
|
|
sphinx-build -a -E -W -d install-guide/build/doctrees -b html install-guide/source install-guide/build/html
|
|
|
|
[testenv:releasenotes]
|
|
commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|