[tox]
envlist =
    cover,cover3,docs,py27,py34,py35,py36,py37,py38,py39,py310,py311,py312,py313

[testenv]
deps =
    attrs < 21.1.0  # see https://github.com/python-attrs/attrs/pull/608
    pytest
    pexpect == 4.7.0  # see https://github.com/Supervisor/supervisor/issues/1327
    mock >= 0.5.0
passenv = END_TO_END
commands =
    pytest --capture=no {posargs}

[testenv:py27-configparser]
;see https://github.com/Supervisor/supervisor/issues/1230
basepython = python2.7
deps =
    {[testenv]deps}
    configparser
passenv = {[testenv]passenv}
commands = {[testenv]commands}

[testenv:cover]
basepython = python2.7
commands =
    pytest --capture=no --cov=supervisor --cov-report=term-missing --cov-report=xml {posargs}
deps =
    {[testenv]deps}
    pytest-cov

[testenv:cover3]
basepython = python3.8
commands =
    pytest --capture=no --cov=supervisor --cov-report=term-missing --cov-report=xml {posargs}
deps =
    {[testenv:cover]deps}

[testenv:docs]
deps =
    pygments >= 2.19.1  # Sphinx build fails on 2.19.0 when highlighting ini block
    Sphinx
    readme
    setuptools >= 18.5
allowlist_externals = make
commands =
    make -C docs html BUILDDIR={envtmpdir} "SPHINXOPTS=-W -E"
    python setup.py check -m -r -s
