[tox]
envlist = py27, py33, py34, py35, pypy, lint, docs

[testenv]
deps= -r{toxinidir}/test_requirements.txt
commands=
    coverage run -m py.test {posargs} {toxinidir}/test/
    coverage report

[testenv:pypy]
# temporarily disable coverage testing on PyPy due to performance problems
commands= py.test {posargs} {toxinidir}/test/

[testenv:py27-twistedMaster]
# This is a validation test that confirms that Twisted's test cases haven't
# broken.
deps =
    # [tls,http2] syntax doesn't work here so we enumerate all dependencies.
    git+https://github.com/twisted/twisted
    pyopenssl
    service_identity
    idna
    priority
    sphinx
commands = python -m twisted.trial --reporter=text twisted

[testenv:lint]
basepython=python3.4
deps = flake8==3.2.1
commands = flake8 --max-complexity 10 h2 test

[testenv:docs]
basepython=python3.5
deps = sphinx==1.4.9
changedir = {toxinidir}/docs
commands =
    rm -rf build
    sphinx-build -nW -b html -d build/doctrees source build/html

[testenv:graphs]
basepython=python2.7
deps = graphviz==0.5.2
commands =
    python visualizer/visualize.py -i docs/source/_static

[tox]
envlist = py27, py33, py34, py35, pypy, lint, docs

[testenv]
deps= -r{toxinidir}/test_requirements.txt
commands=
    coverage run -m py.test {posargs} {toxinidir}/test/
    coverage report

[testenv:pypy]
# temporarily disable coverage testing on PyPy due to performance problems
commands= py.test {posargs} {toxinidir}/test/

[testenv:py27-twistedMaster]
# This is a validation test that confirms that Twisted's test cases haven't
# broken.
deps =
    # [tls,http2] syntax doesn't work here so we enumerate all dependencies.
    git+https://github.com/twisted/twisted
    pyopenssl
    service_identity
    idna
    priority
    sphinx
commands = python -m twisted.trial --reporter=text twisted

[testenv:lint]
basepython=python3.4
deps = flake8==3.2.1
commands = flake8 --max-complexity 10 h2 test

[testenv:docs]
basepython=python3.5
deps = sphinx==1.4.9
changedir = {toxinidir}/docs
whitelist_externals = rm
commands =
    rm -rf build
    sphinx-build -nW -b html -d build/doctrees source build/html

[testenv:graphs]
basepython=python2.7
deps = graphviz==0.5.2
commands =
    python visualizer/visualize.py -i docs/source/_static

Allow rm for building docs.
Allow rm for building docs.
