tox.ini 4.91 KB
Newer Older
1
[tox]
Monty Taylor's avatar
Monty Taylor committed
2 3
minversion = 1.6
skipsdist = True
4
envlist = py26,py27,py26sa07,py27sa07,py26sa08,py27sa08,py26sa09,py27sa09,py33,py34,pep8
5 6

[testenv]
Monty Taylor's avatar
Monty Taylor committed
7
usedevelop = True
Mike Bayer's avatar
Mike Bayer committed
8
whitelist_externals = bash
9 10
# Avoid psycopg2 wheel package rename warnings by not using the binary.
install_command = pip install --no-binary psycopg2 {opts} {packages}
11 12 13
setenv = VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/requirements.txt
       -r{toxinidir}/test-requirements.txt
Mike Bayer's avatar
Mike Bayer committed
14
commands = bash tools/pretty_tox.sh '{posargs}'
15

16
[testenv:py26]
17
deps = sqlalchemy>=0.9
18
       -r{toxinidir}/test-requirements.txt
Cyril Roelandt's avatar
Cyril Roelandt committed
19
       -r{toxinidir}/test-requirements-py2.txt
20 21

[testenv:py27]
22
deps = sqlalchemy>=0.9
23
       -r{toxinidir}/test-requirements.txt
Cyril Roelandt's avatar
Cyril Roelandt committed
24
       -r{toxinidir}/test-requirements-py2.txt
25

26 27 28 29
[testenv:py26sa07]
basepython = python2.6
deps = sqlalchemy>=0.7,<=0.7.99
       -r{toxinidir}/test-requirements.txt
Cyril Roelandt's avatar
Cyril Roelandt committed
30
       -r{toxinidir}/test-requirements-py2.txt
31

32 33 34 35
[testenv:py26sa08]
basepython = python2.6
deps = sqlalchemy>=0.8,<=0.8.99
       -r{toxinidir}/test-requirements.txt
Cyril Roelandt's avatar
Cyril Roelandt committed
36
       -r{toxinidir}/test-requirements-py2.txt
37 38 39 40 41

[testenv:py26sa09]
basepython = python2.6
deps = sqlalchemy>=0.9,<=0.9.99
       -r{toxinidir}/test-requirements.txt
Cyril Roelandt's avatar
Cyril Roelandt committed
42
       -r{toxinidir}/test-requirements-py2.txt
43

44 45 46 47
[testenv:py27sa07]
basepython = python2.7
deps = sqlalchemy>=0.7,<=0.7.99
       -r{toxinidir}/test-requirements.txt
Cyril Roelandt's avatar
Cyril Roelandt committed
48
       -r{toxinidir}/test-requirements-py2.txt
49

50 51 52 53
[testenv:py27sa08]
basepython = python2.7
deps = sqlalchemy>=0.8,<=0.8.99
       -r{toxinidir}/test-requirements.txt
Cyril Roelandt's avatar
Cyril Roelandt committed
54
       -r{toxinidir}/test-requirements-py2.txt
55 56 57 58 59

[testenv:py27sa09]
basepython = python2.7
deps = sqlalchemy>=0.9,<=0.9.99
       -r{toxinidir}/test-requirements.txt
Cyril Roelandt's avatar
Cyril Roelandt committed
60 61 62 63 64 65
       -r{toxinidir}/test-requirements-py2.txt

[testenv:py33]
deps = sqlalchemy>=0.9
       -r{toxinidir}/test-requirements.txt
       -r{toxinidir}/test-requirements-py3.txt
66

67 68 69 70 71
[testenv:py34]
deps = sqlalchemy>=0.9
       -r{toxinidir}/test-requirements.txt
       -r{toxinidir}/test-requirements-py3.txt

72 73 74 75 76 77 78 79 80
[testenv:pep8]
commands = flake8

[testenv:venv]
commands = {posargs}

[testenv:cover]
setenv = VIRTUAL_ENV={envdir}
commands =
81
  python setup.py testr --slowest --testr-args='{posargs}'
82 83

[flake8]
84 85
# E111 indentation is not a multiple of four
# E113 unexpected indentation
86 87 88 89 90 91 92 93
# E121 continuation line indentation is not a multiple of four
# E122 continuation line missing indentation or outdented
# E123 closing bracket does not match indentation of opening bracket's line
# E124 closing bracket does not match visual indentation
# E125 continuation line does not distinguish itself from next logical line
# E126 continuation line over-indented for hanging indent
# E127 continuation line over-indented for visual indent
# E128 continuation line under-indented for visual indent
94 95
# E129 visually indented line with same indent as next logical line
# E131 continuation line unaligned for hanging indent
96 97 98 99 100 101
# E202 whitespace before ')'
# E203 whitespace before ','
# E225 missing whitespace around operator
# E226 missing whitespace around arithmetic operator
# E228 missing whitespace around modulo operator
# E231 missing whitespace after ','
102
# E265 block comment should start with '# '
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120
# H234 assertEquals is deprecated, use assertEqual
# E251 unexpected spaces around keyword / parameter equals
# E261 at least two spaces before inline comment
# E272 multiple spaces before keyword
# E301 expected 1 blank line, found 0
# E302 expected 2 blank lines, found 1
# E303 too many blank lines (3)
# E401 multiple imports on one line
# E501 line too long (<number-of-chars> > 79 characters)
# E502 the backslash is redundant between brackets
# E702 multiple statements on one line (semicolon)
# E712 comparison to True should be 'if cond is True:' or 'if cond:'
# F401 '<module>' imported but unused
# F403 'from migrate.exceptions import *' used; unable to detect undefined names
# F811 redefinition of unused '<type>' from line <lineno>
# F821 undefined name '<name>'
# F841 local variable '<variable>' is assigned to but never used
# H101 Use TODO(NAME)
121
# H201 no 'except:' at least use 'except Exception:'
122 123 124 125
# H202 assertRaises Exception too broad
# H233 Python 3.x incompatible use of print operator
# H301 one import per line
# H302 import only modules. '<import>' does not import a module
126
# H306 imports not in alphabetical order
127 128 129
# H401 docstring should not start with a space
# H402 one line docstring needs punctuation.
# H403 multi line docstring end on new line
130
# H404 multi line docstring should start with a summary
131
# H405 multi line docstring summary not separated with an empty line
132 133
# H501 Do not use locals() for string formatting
# W391 blank line at end of file
134
ignore = E111,E113,E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E202,E203,E225,E226,E228,E231,E251,E261,E265,E272,E301,E302,E303,E401,E501,E502,E702,E712,F401,F403,F811,F821,F841,H101,H201,H202,H233,H234,H301,H302,H306,H401,H402,H403,H404,H405,H501,W391
135 136 137
show-source = true
builtins = _
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,tools,build