2014-08-01 12:26:39 +01:00
|
|
|
[tox]
|
2016-02-10 12:57:41 +00:00
|
|
|
envlist = py27,py34,pep8,pylint,docs
|
2014-08-01 12:26:39 +01:00
|
|
|
skipsdist = True
|
|
|
|
|
|
|
|
[testenv]
|
|
|
|
usedevelop = True
|
|
|
|
deps =
|
2015-10-15 15:26:31 +01:00
|
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
|
2015-08-06 18:38:11 +01:00
|
|
|
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
|
2015-12-25 14:45:33 +05:30
|
|
|
http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
2016-02-10 12:57:41 +00:00
|
|
|
|
2014-08-01 12:26:39 +01:00
|
|
|
install_command = pip install -U {opts} {packages}
|
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
2014-11-22 17:00:56 +00:00
|
|
|
|
2015-10-15 15:26:31 +01:00
|
|
|
whitelist_externals =
|
2015-12-07 07:43:09 +00:00
|
|
|
find
|
2015-10-15 15:26:31 +01:00
|
|
|
coverage
|
|
|
|
rm
|
|
|
|
|
2016-02-10 12:57:41 +00:00
|
|
|
python_files = test_*.py
|
|
|
|
norecursedirs = .tox .venv
|
|
|
|
|
|
|
|
[testenv:venv]
|
|
|
|
commands = {posargs}
|
|
|
|
|
|
|
|
[testenv:py27]
|
|
|
|
basepython = python2.7
|
|
|
|
setenv =
|
|
|
|
OS_TEST_PATH = ./tests/unit
|
2015-10-15 15:26:31 +01:00
|
|
|
commands =
|
2015-12-07 07:43:09 +00:00
|
|
|
find . -type f -name "*.pyc" -delete
|
2015-10-15 15:26:31 +01:00
|
|
|
python setup.py testr --coverage --testr-args="{posargs}"
|
|
|
|
coverage report -m
|
|
|
|
rm -f .coverage
|
2016-02-10 12:57:41 +00:00
|
|
|
rm -rf .testrepository
|
2015-10-15 15:26:31 +01:00
|
|
|
|
2016-02-10 12:57:41 +00:00
|
|
|
[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
|
2015-10-15 15:26:31 +01:00
|
|
|
|
2016-02-04 22:53:26 +00:00
|
|
|
[testenv:docs]
|
|
|
|
commands =
|
|
|
|
python setup.py build_sphinx
|
|
|
|
|
2014-08-01 12:26:39 +01:00
|
|
|
[testenv:pep8]
|
|
|
|
commands = flake8 freezer
|
|
|
|
|
2015-06-14 21:59:41 +01:00
|
|
|
[testenv:pylint]
|
2015-10-23 15:12:31 +01:00
|
|
|
commands = pylint --rcfile .pylintrc freezer
|
2015-06-14 21:59:41 +01:00
|
|
|
|
2014-08-01 12:26:39 +01:00
|
|
|
[flake8]
|
2015-10-15 15:26:31 +01:00
|
|
|
# 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
|
2014-08-01 12:26:39 +01:00
|
|
|
show-source = True
|
2014-11-22 17:00:56 +00:00
|
|
|
exclude = .venv,.tox,dist,doc,test,*egg,tests
|