[tox]
envlist = py27, py37, docs, flake8

[testenv]
sitepackages = true
deps =
    mock
    pytest
    pytest-cov
    responses
commands =
    python -m pytest \
        --basetemp={envtmpdir} \
        --cov=mopidy --cov-report=term-missing \
        {posargs}

[testenv:py37]
# XXX Temporary duplication of the regular testenv to exclude unported tests
sitepackages = true
deps =
    mock
    pytest
    pytest-cov
    responses
commands =
    python -m pytest \
        --basetemp={envtmpdir} \
        --cov=mopidy --cov-report=term-missing \
        # Just deprecation warnings:
        --deselect=tests/core/test_playback.py \
        {posargs}

[testenv:docs]
basepython = python2.7
deps = -r{toxinidir}/docs/requirements.txt
changedir = docs
commands = python -m sphinx -b html -d {envtmpdir}/doctrees . {envtmpdir}/html

[testenv:flake8]
basepython = python2.7
deps =
    flake8
    flake8-import-order
    pep8-naming
commands = python -m flake8 --show-source --statistics mopidy tests

[testenv:linkcheck]
basepython = python2.7
deps = -r{toxinidir}/docs/requirements.txt
changedir = docs
commands = python -m sphinx -b linkcheck -d {envtmpdir}/doctrees . {envtmpdir}/html

[tox]
envlist = py27, py37, docs, flake8

[testenv]
sitepackages = true
deps =
    mock
    pytest
    pytest-cov
    responses
commands =
    python -m pytest \
        --basetemp={envtmpdir} \
        --cov=mopidy --cov-report=term-missing \
        {posargs}

[testenv:docs]
basepython = python2.7
deps = -r{toxinidir}/docs/requirements.txt
changedir = docs
commands = python -m sphinx -b html -d {envtmpdir}/doctrees . {envtmpdir}/html

[testenv:flake8]
basepython = python2.7
deps =
    flake8
    flake8-import-order
    pep8-naming
commands = python -m flake8 --show-source --statistics mopidy tests

[testenv:linkcheck]
basepython = python2.7
deps = -r{toxinidir}/docs/requirements.txt
changedir = docs
commands = python -m sphinx -b linkcheck -d {envtmpdir}/doctrees . {envtmpdir}/html

Remove custom testenv for Py3 porting
py3: Remove custom testenv for Py3 porting
