[tox]
minversion = 2.0
envlist = py{37,38,39}-click{7,8,8-async},py{310}-click{8,8-async},style,docs

[testenv]
deps =
    coverage
    click7: click>=7.0,<8.0
    click8: click>=8.0,<9.0
    click8-async: asyncclick>=8.0,<9.0
commands =
    coverage run --source={toxinidir}/sphinx_click -m unittest {posargs}
    coverage report
pip_pre =
    pre: true

[testenv:coverage]
commands =
    {[testenv]commands}
    coverage {posargs:html}

[testenv:style]
deps =
    flake8
commands =
    flake8 {toxinidir}/sphinx_click/

[testenv:mypy]
deps =
    mypy
    types-docutils
commands =
    mypy sphinx_click

[testenv:docs]
commands =
    sphinx-build -Wn -b html -d docs/_build/doctrees docs docs/_build/html

[coverage:run]
branch = True

[tox]
minversion = 2.0
envlist = py{37,38,39}-click{7,8,8-async},py{310}-click{8,8-async},style,docs

[testenv]
setenv =
    PYTHONDEVMODE = 1
    PYTHONWARNINGS = all
    PYTEST_ADDOPTS = {env:PYTEST_ADDOPTS:} --color yes
deps =
    pytest
    pytest-cov
    coverage
    click7: click>=7.0,<8.0
    click8: click>=8.0,<9.0
    click8-async: asyncclick>=8.0,<9.0
commands =
    python -m pytest --cov {toxinidir}/sphinx_click {posargs}
pip_pre =
    pre: true

[testenv:coverage]
commands =
    {[testenv]commands}
    coverage {posargs:html}

[testenv:style]
deps =
    flake8
commands =
    flake8 {toxinidir}/sphinx_click/

[testenv:mypy]
deps =
    mypy
    types-docutils
commands =
    mypy sphinx_click

[testenv:docs]
commands =
    sphinx-build -Wn -b html -d docs/_build/doctrees docs docs/_build/html

[coverage:run]
branch = True

Switch to pytest for testing
Switch to pytest for testing

This will allow us to use sphinx.testing

Signed-off-by: Stephen Finucane <06fa905d7f2aaced6dc72e9511c71a2a51e8aead@that.guru>
