[tox]
envlist = py27,py34,pep8
minversion = 1.6
skipsdist = True

[testenv]
setenv = VIRTUAL_ENV={envdir}
         PYTHONWARNINGS=default::DeprecationWarning
usedevelop = True
install_command = pip install -U {opts} {packages}
deps = -egit+https://git.openstack.org/openstack/neutron@stable/newton#egg=neutron
       -r{toxinidir}/requirements.txt
       -r{toxinidir}/test-requirements.txt
whitelist_externals = bash
commands = bash tools/pretty_tox.sh '{posargs}'

[testenv:pep8]
commands = flake8

[testenv:i18n]
commands = python ./tools/check_i18n.py ./networking_fortinet ./tools/i18n_cfg.py

[testenv:venv]
commands = {posargs}

[testenv:cover]
commands = python setup.py test --coverage --coverage-package-name=networking_fortinet --testr-args='{posargs}'

[testenv:docs]
commands = python setup.py build_sphinx

[hacking]
import_exceptions = neutron.i18n
local-check-factory = neutron.hacking.checks.factory
show-source = True
ignore = E123,E124,E125,H803

[flake8]
# E125 continuation line does not distinguish itself from next logical line
# E126 continuation line over-indented for hanging indent
# E128 continuation line under-indented for visual indent
# E129 visually indented line with same indent as next logical line
# E265 block comment should start with ‘# ‘
# H301 one import per line
# H404 multi line docstring should start with a summary
# H405 multi line docstring summary not separated with an empty line

show-source = True
ignore = E125,E126,E128,E129,E265,H301,H404,H405
builtins = _
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools,templates.py
