d580bf8538
Added capability to run test and pep8. Change-Id: I0f45d9b5b6a6cd22a99395a12e56433539f561b6 Closes-bug: #1527406
63 lines
1.7 KiB
INI
63 lines
1.7 KiB
INI
[tox]
|
|
envlist = py27,pep8
|
|
minversion = 1.6
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
basepython=python2.7
|
|
usedevelop = True
|
|
install_command = pip install -U {opts} {packages}
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
# Note the hash seed is set to 0 until horizon can be tested with a
|
|
# random hash seed successfully.
|
|
# PYTHONHASHSEED=0
|
|
deps =
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands =
|
|
{envpython} {toxinidir}/manage.py test tacker_horizon --settings=tacker_horizon.test.settings {posargs}
|
|
|
|
[testenv:py27]
|
|
commands =
|
|
{envpython} {toxinidir}/manage.py test tacker_horizon --settings=tacker_horizon.test.settings {posargs}
|
|
|
|
[tox:jenkins]
|
|
|
|
[testenv:pep8]
|
|
usedevelop = True
|
|
whitelist_externals =
|
|
git
|
|
setenv =
|
|
{[testenv]setenv}
|
|
DJANGO_SETTINGS_MODULE=tacker_horizon.test.settings
|
|
commands =
|
|
flake8
|
|
|
|
[testenv:doc]
|
|
deps = Sphinx
|
|
commands = sphinx-build doc/source doc/build
|
|
|
|
[testenv:cover]
|
|
setenv = NOSE_WITH_COVERAGE=1
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[flake8]
|
|
# E127 continuation line over-indented for visual indent
|
|
# E128 continuation line under-indented for visual indent
|
|
# E201 whitespace after '{'
|
|
# E225 missing whitespace around operator
|
|
# E231 missing whitespace after ','
|
|
# E265 block comment should start with '# '
|
|
# E302 expected 2 blank lines, found 1
|
|
# E303 too many blank lines (3)
|
|
# E501 line too long (94 > 79 characters)
|
|
# H101 Use TODO(NAME)
|
|
# H238 old style class declaration, use new style (inherit from `object`)
|
|
# H306 imports not in alphabetical order
|
|
# H701 Empty localization string
|
|
# F401 imported but unused
|
|
# E502 the backslash is redundant between brackets
|
|
ignore = E123,E127,E128,E133,E201,E225,E226,E231,E241,E242,E265,E302,E303,E501,E502,E731,H101,H238,H306,H701,F401
|