[tox]
envlist =
    py{39, 310, 311, 312}
    pypy{39, 310}
    pep8
    packaging
    noextra
    mypy
isolated_build = True

[testenv]
package = wheel
wheel_build_env = build_wheel
deps =
    pytest
    pytest-cov
    pytest-icdiff
setenv =
    # Display up to 20 frames in backtraces when showing ResourceWarnings.
    PYTHONTRACEMALLOC=20
commands =
    pytest -Wall --strict-markers --cov {posargs}
extras = md

[testenv:mypy]
basepython = python3
deps =
    mypy
    types-bleach
    types-docutils
    types-Pygments
commands = mypy readme_renderer

[testenv:pep8]
basepython = python3
skip_install = true
deps =
    flake8
    pep8-naming
commands = flake8 readme_renderer tests

[testenv:packaging]
deps =
    check-manifest
    build
    twine
commands =
    check-manifest
    python -m build
    python -m twine check dist/*

[testenv:noextra]
basepython = python3
extras =

[flake8]
select = E,W,F,N
max-line-length = 88
