# Tox (http://tox.testrun.org/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.

# Note: If you update this, make sure to update .travis.yml, too.

[tox]
envlist =
    py{27,34,35,36,37}
    pypy
    py{27,34,35,36,37}-build-no-lang
    docs
    lint
    vendorverify

[testenv]
basepython =
    py27: python2.7
    py34: python3.4
    py35: python3.5
    py36: python3.6
    py37: python3.7
deps =
    -rrequirements-dev.txt
commands =
    pytest {posargs:-v}
    python setup.py build

[testenv:py27-build-no-lang]
basepython = python2.7
setenv =
    LANG=
commands =
    python setup.py build

[testenv:py34-build-no-lang]
basepython = python3.4
setenv =
    LANG=
commands =
    python setup.py build

[testenv:py35-build-no-lang]
basepython = python3.5
setenv =
    LANG=
commands =
     python setup.py build

[testenv:py36-build-no-lang]
basepython = python3.6
setenv =
    LANG=
commands =
    python setup.py build

[testenv:py37-build-no-lang]
basepython = python3.7
setenv =
    LANG=
commands =
    python setup.py build

[testenv:lint]
basepython = python3.6
changedir = scripts
deps =
    -rrequirements-dev.txt
commands =
    ./run_tests.sh lint

[testenv:vendorverify]
basepython = python3.6
changedir = scripts
deps =
    -rrequirements-dev.txt
commands =
    ./run_tests.sh vendorverify

[testenv:docs]
basepython = python3.6
changedir = docs
deps =
    -rrequirements-dev.txt
commands =
    sphinx-build -b html -d {envtmpdir}/doctrees . {envtmpdir}/html
