2015-03-11 00:38:37 +01:00
|
|
|
[tox]
|
2017-01-09 10:31:01 +01:00
|
|
|
envlist = py26,py27,py35,py36
|
2016-03-11 17:25:28 +01:00
|
|
|
|
|
|
|
[testenv:py35]
|
|
|
|
deps = -r{toxinidir}/test/utils/tox/requirements-py3.txt
|
|
|
|
|
2017-01-05 21:06:58 +01:00
|
|
|
[testenv:py36]
|
|
|
|
deps = -r{toxinidir}/test/utils/tox/requirements-py3.txt
|
|
|
|
|
2015-03-11 00:38:37 +01:00
|
|
|
[testenv]
|
2016-03-11 17:25:28 +01:00
|
|
|
deps = -r{toxinidir}/test/utils/tox/requirements.txt
|
2015-03-11 00:38:37 +01:00
|
|
|
whitelist_externals = make
|
2015-05-08 18:34:19 +02:00
|
|
|
commands =
|
2015-08-01 07:50:05 +02:00
|
|
|
python --version
|
2016-05-11 21:03:23 +02:00
|
|
|
py26: python -m compileall -fq -x 'test/samples|contrib/inventory/vagrant.py' lib test contrib
|
|
|
|
py27: python -m compileall -fq -x 'test/samples' lib test contrib
|
2017-01-05 21:06:58 +01:00
|
|
|
py3{5,6}: python -m compileall -fq -x 'test/samples|lib/ansible/modules' lib test contrib
|
2015-10-19 08:43:27 +02:00
|
|
|
make tests
|
2017-01-18 22:48:11 +01:00
|
|
|
passenv =
|
|
|
|
# Pass HOME to the test environment to avoid the missing HOME env
|
|
|
|
# variable error. See issue: #20424
|
|
|
|
HOME
|
2017-02-21 00:24:39 +01:00
|
|
|
TEST_FLAGS
|
2015-11-11 16:50:19 +01:00
|
|
|
|
|
|
|
|
|
|
|
[flake8]
|
|
|
|
# These are things that the devs don't agree make the code more readable
|
2017-02-03 05:49:33 +01:00
|
|
|
# https://github.com/ansible/proposals/issues/50
|
|
|
|
# E123 closing bracket does not match indentation of opening bracket's line
|
|
|
|
# E124 closing bracket does not match visual indentation
|
|
|
|
# E127 continuation line over-indented for visual indent
|
2015-11-11 16:50:19 +01:00
|
|
|
# E128 continuation line under-indented for visual indent
|
|
|
|
# E201 whitespace after '['
|
|
|
|
# E202 whitespace before ']'
|
|
|
|
# E203 whitespace before ','
|
|
|
|
# E221 multiple spaces before operator
|
2017-02-03 05:49:33 +01:00
|
|
|
# E222 multiple spaces after operator
|
2015-11-11 16:50:19 +01:00
|
|
|
# E225 missing whitespace around operator
|
|
|
|
# E226 missing whitespace around arithmetic operator
|
2017-02-03 05:49:33 +01:00
|
|
|
# E227 missing whitespace around bitwise or shift operator
|
|
|
|
# E228 missing whitespace around modulo operator
|
2015-11-11 16:50:19 +01:00
|
|
|
# E231 missing whitespace after ','
|
|
|
|
# E241 multiple spaces after ','
|
|
|
|
# E251 unexpected spaces around keyword / parameter equals
|
2017-02-03 05:49:33 +01:00
|
|
|
# E261 at least two spaces before inline comment
|
|
|
|
# E262 inline comment should start with '# '
|
|
|
|
# E265 block comment should start with '# '
|
|
|
|
# E266 too many leading '#' for block comment
|
|
|
|
# E301 expected 1 blank line, found 0
|
|
|
|
# E302 expected 2 blank lines, found 1
|
|
|
|
# E303 too many blank lines (3)
|
|
|
|
# E402 module level import not at top of file
|
|
|
|
# E502 the backslash is redundant between brackets
|
|
|
|
# E713 test for membership should be 'not in'
|
|
|
|
# E731 do not assign a lambda expression, use a def
|
|
|
|
# W391 blank line at end of file
|
|
|
|
# W503 line break before binary operator
|
|
|
|
ignore = E123,E124,E127,E128,E201,E202,E203,E211,E221,E222,E225,E226,E228,E227,E231,E241,E251,E261,E262,E265,E266,E301,E302,E303,E402,E502,E713,E731,W391,W503
|
2015-11-11 16:50:19 +01:00
|
|
|
# not all the devs believe in 80 column line length
|
|
|
|
max-line-length = 160
|
|
|
|
# Not going to worry about style in the test suite
|
|
|
|
exclude = tests/*
|