blob: dbd0526be5beb2a0237908e8567e9a4a498328ce [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]
Dongcan Ye63813952017-11-18 14:22:25 +080016commands =
17 sh ./tools/misc-sanity-checks.sh
18 flake8 {posargs}
19whitelist_externals =
20 sh
Chandan Kumar5e619872017-09-07 22:23:55 +053021
22[testenv:venv]
23commands = {posargs}
24
25[testenv:cover]
26commands = python setup.py test --coverage --testr-args='{posargs}'
27
28[testenv:docs]
29commands = python setup.py build_sphinx
30
31[testenv:releasenotes]
32commands =
33 sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
34
35[testenv:debug]
36commands = oslo_debug_helper {posargs}
37
38[flake8]
Chandan Kumar667d3d32017-09-22 12:24:06 +053039# E125 continuation line does not distinguish itself from next logical line
40# E126 continuation line over-indented for hanging indent
41# E128 continuation line under-indented for visual indent
42# E129 visually indented line with same indent as next logical line
43# E265 block comment should start with '# '
44# H404 multi line docstring should start with a summary
45# H405 multi line docstring summary not separated with an empty line
46# N530 direct neutron imports not allowed
47# TODO(ihrachys) figure out what to do with N534 and N536
48# N534 Untranslated exception message
49# N536 Use assertIsNone rather than assertEqual to check for None values
50ignore = E125,E126,E128,E129,E265,H404,H405,N530,N534,N536
51# H106: Don't put vim configuration in source files
52# H203: Use assertIs(Not)None to check for None
53# H904: Delay string interpolations at logging calls
54enable-extensions=H106,H203,H904
55show-source = true
56exclude = ./.*,build,dist,doc
57import-order-style = pep8