[testenv]
basepython = python3

[testenv:style]
deps =
    flake8
    black
changedir = {toxinidir}
commands =
    black form_designer tests setup.py
    flake8 .
skip_install = true

[testenv:docs]
deps =
    Sphinx
changedir = docs
commands = make html
skip_install = true
whitelist_externals = make

[testenv:tests]
deps =
    Django
    Pillow
    FeinCMS
    django-admin-ordering
    django-mptt
    six
    xlsxdocument
    coverage
changedir = {toxinidir}
skip_install = true
commands =
    python -Wd {envbindir}/coverage run tests/manage.py test -v 2 {posargs:testapp}
    coverage html

[tox]
envlist = style,docs,tests

[testenv]
basepython = python3

[testenv:style]
deps =
    flake8
    black
changedir = {toxinidir}
commands =
    black form_designer tests setup.py
    flake8 .
skip_install = true

[testenv:docs]
deps =
    Sphinx
changedir = docs
commands = make html
skip_install = true
whitelist_externals = make

[testenv:tests]
deps =
    Django
    Pillow
    FeinCMS
    django-admin-ordering
    django-mptt
    six
    xlsxdocument
    coverage
changedir = {toxinidir}
skip_install = true
commands =
    python -Wd {envbindir}/coverage run tests/manage.py test -v 2 {posargs:testapp}
    coverage report -m

[testenv:tests-old]
deps =
    Django<2
    Pillow
    FeinCMS
    django-admin-ordering
    django-mptt
    six
    xlsxdocument
    coverage
changedir = {toxinidir}
skip_install = true
commands =
    python -Wd {envbindir}/coverage run tests/manage.py test -v 2 {posargs:testapp}
    coverage report -m

Allow easily running tests with old Django versions
Allow easily running tests with old Django versions
