keystone/tox.ini
David Stanek f599a768fd Ignore multiple imports per line for six.moves
In the transition to Python3 we'll be heavily using six.move to import
builtins that have changed and modules that have moved. Having them all
on one line will, in many cases, make the code look cleaner. There is
exactly what we already do with the i18n translation helpers.

bp python3
Change-Id: I5c56a1cf36749d9f190e4360d5a12616380b6598
2015-04-25 00:02:33 +00:00

126 lines
3.8 KiB
INI

[tox]
minversion = 1.6
skipsdist = True
envlist = py27,py33,py34,pep8,docs,sample_config
[testenv]
usedevelop = True
install_command = pip install -U {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = bash tools/pretty_tox.sh '{posargs}'
whitelist_externals = bash
[testenv:py33]
deps = -r{toxinidir}/requirements-py3.txt
-r{toxinidir}/test-requirements-py3.txt
nose
commands =
nosetests --with-coverage --cover-package=keystone \
--exclude test_ldap \
keystone/tests/test_auth_plugin.py \
keystone/tests/test_backend.py \
keystone/tests/test_backend_rules.py \
keystone/tests/test_cache_backend_mongo.py \
keystone/tests/test_driver_hints.py \
keystone/tests/test_hacking_checks.py \
keystone/tests/test_injection.py \
keystone/tests/test_matchers.py \
keystone/tests/test_policy.py \
keystone/tests/test_singular_plural.py \
keystone/tests/test_sizelimit.py \
keystone/tests/test_sql_migrate_extensions.py \
keystone/tests/test_token_bind.py \
keystone/tests/test_url_middleware.py \
keystone/tests/unit/common/test_utils.py \
keystone/tests/test_validation.py \
keystone/tests/test_v3_controller.py \
keystone/tests/test_wsgi.py \
keystone/tests/unit
[testenv:py34]
deps = -r{toxinidir}/requirements-py3.txt
-r{toxinidir}/test-requirements-py3.txt
nose
commands =
nosetests --with-coverage --cover-package=keystone \
--exclude test_ldap \
keystone/tests/test_auth_plugin.py \
keystone/tests/test_backend.py \
keystone/tests/test_backend_rules.py \
keystone/tests/test_cache_backend_mongo.py \
keystone/tests/test_driver_hints.py \
keystone/tests/test_hacking_checks.py \
keystone/tests/test_injection.py \
keystone/tests/test_matchers.py \
keystone/tests/test_policy.py \
keystone/tests/test_singular_plural.py \
keystone/tests/test_sizelimit.py \
keystone/tests/test_sql_migrate_extensions.py \
keystone/tests/test_token_bind.py \
keystone/tests/test_url_middleware.py \
keystone/tests/unit/common/test_utils.py \
keystone/tests/test_validation.py \
keystone/tests/test_v3_controller.py \
keystone/tests/test_wsgi.py \
keystone/tests/unit
[testenv:pep8]
commands =
flake8 {posargs}
# Run bash8 during pep8 runs to ensure violations are caught by
# the check and gate queues
bashate run_tests.sh examples/pki/gen_pki.sh
# Check that .po and .pot files are valid.
bash -c "find keystone -type f -regex '.*\.pot?' -print0| \
xargs -0 -n 1 msgfmt --check-format -o /dev/null"
[tox:jenkins]
downloadcache = ~/cache/pip
[testenv:cover]
commands = python setup.py testr --coverage --testr-args='{posargs}'
[testenv:venv]
commands = {posargs}
[testenv:debug]
commands = oslo_debug_helper {posargs}
[testenv:functional]
basepython = python3.4
deps = requests
python-keystoneclient>=0.11.1
testrepository>=0.0.18
oslotest>=1.2.0
setenv = OS_TEST_PATH=./keystone/tests/functional
commands = python setup.py testr --slowest --testr-args='{posargs}'
[flake8]
filename= *.py,keystone-all,keystone-manage
show-source = true
# H405 multi line docstring summary not separated with an empty line
ignore = H405
exclude=.venv,.git,.tox,build,dist,doc,*openstack/common*,*lib/python*,*egg,tools,vendor,.update-venv,*.ini,*.po,*.pot
max-complexity=24
[testenv:docs]
commands=
python setup.py build_sphinx
[testenv:sample_config]
commands = oslo-config-generator --config-file=config-generator/keystone.conf
[testenv:bandit]
deps = bandit~=0.10.0
commands = bandit -c bandit.yaml -r keystone -n5 -p keystone_conservative
[hacking]
import_exceptions =
keystone.i18n
six.moves
local-check-factory = keystone.hacking.checks.factory