# tox (https://tox.readthedocs.io/) 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.

[tox]
# NOTE: remember to update the list of Python versions in .travis.yml
envlist = py34, py35, py36, docs

[testenv]
commands = pytest {posargs}
deps =
    pytest

[testenv:docs]
basepython = python3
changedir = docs
deps = sphinx
commands = python -m sphinx -W -n -b html -d {envtmpdir}/doctrees . {envtmpdir}/html

# tox (https://tox.readthedocs.io/) 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.

[tox]
envlist = py34, py35, py36, docs, cov

[travis]
# NOTE: remember to update the list of Python versions in .travis.yml
python =
  3.4: py34
  3.5: py35
  3.6: py36, traviscodecov

[testenv]
commands = pytest {posargs}
deps =
    pytest

[testenv:docs]
changedir = docs
deps = sphinx
commands = python -m sphinx -W -n -b html -d {envtmpdir}/doctrees . {envtmpdir}/html

[testenv:cov]
commands = pytest --cov=neuroglancer_scripts/
deps =
    {[testenv]deps}
    pytest-cov

[testenv:traviscodecov]
passenv = CI TRAVIS TRAVIS_*
deps =
    {[testenv:cov]deps}
    codecov
commands =
    {[testenv:cov]commands}
    codecov

Add code coverage to Tox + Travis configuration
Add code coverage to Tox + Travis configuration
