![Victor Stinner](/assets/img/avatar_default.png)
* Rework BrickException to simplify the code. Revert partially changes done to port os-brick to Python 3, without losing Python 3 compatibility. * tox.ini: run py34 tests using the commands of the default test environent. All os-brick tests now pass on Python 3.4, so testr test runner can be used to run tests in parallel, get the test repository, etc. * tox.ini: exchange order of py27 and py34 in envlist: py34 must be run first to workaround a testrepository bug (see the note below). * README: give advices on tox/testrepository issues with python 2/3 Change-Id: If80e01e802079afea3f2ea8051c76afffa47fa03
63 lines
1.6 KiB
INI
63 lines
1.6 KiB
INI
[tox]
|
|
minversion = 1.6
|
|
envlist = py34,py27,pep8
|
|
skipsdist = True
|
|
|
|
[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 = python setup.py testr --slowest --testr-args='{posargs}'
|
|
whitelist_externals = bash
|
|
|
|
[tox:jenkins]
|
|
downloadcache = ~/cache/pip
|
|
|
|
[testenv:pep8]
|
|
commands = flake8
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:cover]
|
|
commands = python setup.py testr --coverage --testr-args='{posargs}'
|
|
|
|
[testenv:docs]
|
|
commands = python setup.py build_sphinx
|
|
|
|
[flake8]
|
|
# H803 skipped on purpose per list discussion.
|
|
# E123, E125 skipped as they are invalid PEP-8.
|
|
# Following checks are ignored on purpose.
|
|
#
|
|
# E251 unexpected spaces around keyword / parameter equals
|
|
# reason: no improvement in readability
|
|
#
|
|
# E265 block comment should start with '# '
|
|
# reason: no improvement in readability
|
|
#
|
|
# H402 one line docstring needs punctuation
|
|
# reason: removed in hacking (https://review.openstack.org/#/c/101497/)
|
|
#
|
|
# H803 git commit title should not end with period
|
|
# reason: removed in hacking (https://review.openstack.org/#/c/101498/)
|
|
#
|
|
# H904 wrap long lines in parentheses instead of a backslash
|
|
# reason: removed in hacking (https://review.openstack.org/#/c/101701/)
|
|
#
|
|
# Due to the upgrade to hacking 0.9.2 the following checking are
|
|
# ignored on purpose for the moment and should be re-enabled.
|
|
|
|
|
|
show-source = True
|
|
ignore = E123,E125,E251,E265,H302,H402,H405,H803,H904
|
|
builtins = _
|
|
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build
|
|
max-complexity=30
|
|
|
|
[hacking]
|
|
import_exceptions = os_brick.i18n
|