; a generative tox configuration, see: https://testrun.org/tox/latest/config.html#generative-envlist

[tox]
envlist =
    clean,
    check,
    {2.6,2.7,3.3,3.4,3.5,pypy}-{cover,nocov},
    report,
    docs

[testenv]
basepython =
    pypy: {env:TOXPYTHON:pypy}
    2.6: {env:TOXPYTHON:python2.6}
    {2.7,docs,spell}: {env:TOXPYTHON:python2.7}
    3.3: {env:TOXPYTHON:python3.3}
    3.4: {env:TOXPYTHON:python3.4}
    3.5: {env:TOXPYTHON:python3.5}
    {clean,check,report,extension-coveralls,coveralls}: python3.4
setenv =
    PYTHONPATH={toxinidir}/tests
    PYTHONUNBUFFERED=yes
passenv =
    *
deps =
    responses
    nose
    cover: coverage
commands =
    nocov: {posargs:nosetests -v tests}
    cover: {posargs:nosetests --with-coverage --cover-package=primer_designer}
usedevelop = true

[testenv:spell]
setenv =
    SPELLCHECK=1
commands =
    sphinx-build -b spelling docs dist/docs
skip_install = true
usedevelop = true
deps =
    -r{toxinidir}/docs/requirements.txt
    sphinxcontrib-spelling
    pyenchant

[testenv:docs]
deps =
    -r{toxinidir}/docs/requirements.txt
commands =
    sphinx-build {posargs:-E} -b html docs dist/docs
    sphinx-build -b linkcheck docs dist/docs

[testenv:check]
basepython = python3.4
deps =
    docutils
    check-manifest
    flake8
    readme
    pygments
skip_install = true
usedevelop = false
commands =
    python setup.py check --strict --metadata --restructuredtext
    check-manifest {toxinidir}
    flake8 primer_designer tests

[testenv:coveralls]
deps =
    coveralls
skip_install = true
usedevelop = false
commands =
    coverage combine
    coverage report
    coveralls []

[testenv:report]
basepython = python3.4
deps = coverage
skip_install = true
usedevelop = false
commands =
    coverage combine
    coverage report

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

[testenv:2.6-nocov]
usedevelop = false

[testenv:2.7-nocov]
usedevelop = false

[testenv:3.3-nocov]
usedevelop = false

[testenv:3.4-nocov]
usedevelop = false

[testenv:3.5-nocov]
usedevelop = false

[testenv:pypy-nocov]
usedevelop = false

