3f635a26a4
We're close to the end of porting all unit tests to be compatible with python34. However, ~8 tests are skipped specifically in python34 because of bugs mostly in mox3. Those tests will likely have to be converted to mock in the future. Note that from now on, every test added will have to be python34 compatible. Also, fix __str__ function of ExceptionGroup in test_scheduler. It intentionally uses str so as to not flatten the unicode literal in python2.7 and also be compatible with python3.4 blueprint heat-python34-support Change-Id: Id9b8aa11b17c96895092dd701b761a479df09282
76 lines
2.2 KiB
INI
76 lines
2.2 KiB
INI
[tox]
|
|
envlist = py34,py27,pep8
|
|
minversion = 1.6
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
usedevelop = True
|
|
install_command = pip install {opts} {packages}
|
|
deps = -r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands =
|
|
find {toxinidir} -not -path '{toxinidir}/.tox/*' -name '*.pyc' -delete
|
|
python setup.py testr --slowest --testr-args='^(?!heat_integrationtests){posargs}'
|
|
|
|
whitelist_externals =
|
|
bash
|
|
find
|
|
|
|
[testenv:py27log]
|
|
commands =
|
|
find . -type f -name "*.pyc" -delete
|
|
bash tools/pretty_tox.sh '^(?!heat_integrationtests){posargs}'
|
|
|
|
[testenv:integration]
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
OS_TEST_PATH=./heat_integrationtests
|
|
TESTR_START_DIR=heat_integrationtests
|
|
passenv = OS_*
|
|
usedevelop = False
|
|
deps = -r{toxinidir}/heat_integrationtests/requirements.txt
|
|
commands =
|
|
bash tools/pretty_tox.sh '{posargs}'
|
|
|
|
[testenv:pep8]
|
|
commands =
|
|
flake8 heat bin/heat-api bin/heat-api-cfn bin/heat-api-cloudwatch bin/heat-engine bin/heat-manage contrib heat_integrationtests doc/source
|
|
# Check that .po and .pot files are valid:
|
|
bash -c "find heat -type f -regex '.*\.pot?' -print0|xargs -0 -n 1 msgfmt --check-format -o /dev/null"
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:cover]
|
|
commands =
|
|
python setup.py testr --coverage --testr-args='^(?!heat_integrationtests){posargs}'
|
|
|
|
[testenv:docs]
|
|
deps = -r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
sphinxcontrib-httpdomain
|
|
commands = python setup.py build_sphinx
|
|
|
|
[testenv:genconfig]
|
|
commands =
|
|
oslo-config-generator --config-file=config-generator.conf
|
|
oslo-config-generator --config-file=heat_integrationtests/config-generator.conf
|
|
|
|
[testenv:bandit]
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
commands = bandit -c bandit.yaml -r heat -n5 -p heat_conservative
|
|
|
|
[flake8]
|
|
# H404 multi line docstring should start with a summary
|
|
# H405 multi line docstring summary not separated with an empty line
|
|
ignore = H404,H405
|
|
show-source = true
|
|
exclude=.*,dist,*openstack/common*,*lib/python*,*egg,tools,build,*convergence/scenarios/*
|
|
max-complexity=20
|
|
|
|
[hacking]
|
|
import_exceptions = heat.common.i18n
|
|
|
|
[testenv:debug]
|
|
commands = oslo_debug_helper {posargs}
|