blob: 74c85e55836b126dbe32f486ac79f07156703dd0 [file] [log] [blame]
Chandan Kumar5e619872017-09-07 22:23:55 +05301[tox]
2minversion = 2.0
3envlist = py34,py27,pypy,pep8
4skipsdist = True
5
6[testenv]
7usedevelop = True
8install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
9setenv =
10 VIRTUAL_ENV={envdir}
11 PYTHONWARNINGS=default::DeprecationWarning
12deps = -r{toxinidir}/test-requirements.txt
13commands = python setup.py test --slowest --testr-args='{posargs}'
14
15[testenv:pep8]
16commands = flake8 {posargs}
17
18[testenv:venv]
19commands = {posargs}
20
21[testenv:cover]
22commands = python setup.py test --coverage --testr-args='{posargs}'
23
24[testenv:docs]
25commands = python setup.py build_sphinx
26
27[testenv:releasenotes]
28commands =
29 sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
30
31[testenv:debug]
32commands = oslo_debug_helper {posargs}
33
34[flake8]
Chandan Kumar667d3d32017-09-22 12:24:06 +053035# E125 continuation line does not distinguish itself from next logical line
36# E126 continuation line over-indented for hanging indent
37# E128 continuation line under-indented for visual indent
38# E129 visually indented line with same indent as next logical line
39# E265 block comment should start with '# '
40# H404 multi line docstring should start with a summary
41# H405 multi line docstring summary not separated with an empty line
42# N530 direct neutron imports not allowed
43# TODO(ihrachys) figure out what to do with N534 and N536
44# N534 Untranslated exception message
45# N536 Use assertIsNone rather than assertEqual to check for None values
46ignore = E125,E126,E128,E129,E265,H404,H405,N530,N534,N536
47# H106: Don't put vim configuration in source files
48# H203: Use assertIs(Not)None to check for None
49# H904: Delay string interpolations at logging calls
50enable-extensions=H106,H203,H904
51show-source = true
52exclude = ./.*,build,dist,doc
53import-order-style = pep8