# 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.

[tox]
envlist = coverage-clean, py27, py36, manifest, docs, coverage-report

[testenv]
commands = coverage run --parallel -m pytest tests {posargs}
deps =
    coverage
    pytest
    mock
    git+git://github.com/pybel/pybel-test-extension.git
whitelist_externals =
    /bin/cat
    /bin/cp
    /bin/mkdir

[testenv:coverage-clean]
deps = coverage
skip_install = true
commands = coverage erase

[testenv:manifest]
deps = check-manifest
commands = check-manifest

[testenv:docs]
changedir = docs
deps =
    sphinx
    sphinx_rtd_theme
commands =
    mkdir -p {envtmpdir}
    cp -r source {envtmpdir}/source
    sphinx-build -W -b html -d {envtmpdir}/build/doctrees {envtmpdir}/source {envtmpdir}/build/html
    sphinx-build -W -b coverage -d {envtmpdir}/build/doctrees {envtmpdir}/source {envtmpdir}/build/coverage
    cat {envtmpdir}/build/coverage/c.txt
    cat {envtmpdir}/build/coverage/python.txt

[testenv:coverage-report]
deps = coverage
skip_install = true
commands =
    coverage combine
    coverage report

# 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.

[tox]
envlist = coverage-clean, py27, py36, manifest, docs, coverage-report

[testenv]
commands = coverage run --parallel -m pytest tests {posargs}
deps =
    coverage
    pytest
    mock
    git+git://github.com/pybel/pybel-test-extension.git
whitelist_externals =
    /bin/cat
    /bin/cp
    /bin/mkdir

[testenv:coverage-clean]
deps = coverage
skip_install = true
commands = coverage erase

[testenv:manifest]
deps = check-manifest
commands = check-manifest

[testenv:docs]
changedir = docs
deps =
    sphinx
    sphinx_rtd_theme
    mock
commands =
    mkdir -p {envtmpdir}
    cp -r source {envtmpdir}/source
    sphinx-build -W -b html -d {envtmpdir}/build/doctrees {envtmpdir}/source {envtmpdir}/build/html
    sphinx-build -W -b coverage -d {envtmpdir}/build/doctrees {envtmpdir}/source {envtmpdir}/build/coverage
    cat {envtmpdir}/build/coverage/c.txt
    cat {envtmpdir}/build/coverage/python.txt

[testenv:coverage-report]
deps = coverage
skip_install = true
commands =
    coverage combine
    coverage report

Add mock to docs dependencies
Add mock to docs dependencies

This makes it work for py27
