c4218f0385
Change-Id: I03160bf2dba1b67b1daf7c60f4f0182acc2a4d90
81 lines
1.8 KiB
INI
81 lines
1.8 KiB
INI
[tox]
|
|
envlist = py27,py34,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 -U {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 = ./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:py34]
|
|
basepython = python3.4
|
|
setenv =
|
|
OS_TEST_PATH = ./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]
|
|
commands =
|
|
python setup.py build_sphinx
|
|
|
|
[testenv:pep8]
|
|
commands = flake8 freezer
|
|
|
|
[testenv:pylint]
|
|
commands = pylint --rcfile .pylintrc freezer
|
|
|
|
[flake8]
|
|
# it's not a bug that we aren't using all of hacking
|
|
# H102 -> apache2 license exists
|
|
# H103 -> license is apache
|
|
# H201 -> no bare excepts
|
|
# H501 -> don't use locals() for str formatting
|
|
# H903 -> \n not \r\n
|
|
ignore = H
|
|
select = H102, H103, H201, H501, H903, H201, H306, H301, H233
|
|
show-source = True
|
|
exclude = .venv,.tox,dist,doc,test,*egg,tests
|