[tox]
envlist = coverage-clean,py26,py27,py34,py35,pypy,{py27,py35}-nooptionals,coverage-report


[base]
deps =
    coverage
    pytest

[testenv]
deps =
    {[base]deps}
    py26: unittest2
    ; Twisted does not support Python 2.6.
    {py27,py34,py35,pypy}: twisted
commands = coverage run --parallel -m pytest {posargs}


; Ensure test suite passes if no optional dependencies are present.
[testenv:py27-nooptionals]
deps = {[base]deps}
commands = coverage run --parallel -m pytest {posargs}

[testenv:py35-nooptionals]
deps = {[base]deps}
commands = coverage run --parallel -m pytest {posargs}


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


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