[tox]
envlist = py, pre-commit, docs
skipsdist = true

[testenv]
deps =
    flake8
    pytest
    responses
    .
commands =
    {envpython} -m pytest tests/ --strict-markers  {posargs}

[testenv:pre-commit]
skip_install = true
deps = pre-commit
commands =
    pre-commit run --all-files --show-diff-on-failure

[testenv:docs]
deps = sphinx_rtd_theme
    .
commands =
    sphinx-build -b html -d {envtmpdir}/doctrees docs docs/_build/

[pytest]
markers =
    regenerate_rendered_specs
