[tox]
envlist =
    py{27,33,34,35,36}-WTForms{1,2}
    flake8
    docs-html
skipsdist = true
skip_missing_interpreters = true

[flake8]
max_line_length = 120
ignore = E402,E722

[testenv]
usedevelop = true
deps =
    WTForms1: WTForms==1.0.5
    WTForms2: WTForms>=2.0
    -r{toxinidir}/requirements-dev.txt
commands =
    nosetests flask_admin/tests --with-coverage --cover-erase --cover-inclusive

[testenv:flake8]
deps = flake8
commands = flake8 flask_admin

[testenv:docs-html]
deps =
    sphinx
    sphinx-intl
commands = sphinx-build -b html -d build/doctrees doc build/html
