[tox]
requires =
    tox>=4.32
env_list =
    lint
    mypy
    py{py3}
    py{311-315}
    py{314-315}t

[testenv]
deps =
    numpy
    pytest-sugar
extras =
    tests
commands =
    {envpython} selftest.py
    {envpython} -m pytest \
      --cov PIL \
      --cov Tests \
      --cov-report html \
      --cov-report term \
      --cov-report xml \
      --dist worksteal \
      --numprocesses auto \
      -W always \
      {posargs}

[testenv:lint]
skip_install = true
deps =
    check-manifest
    prek
pass_env =
    PREK_COLOR
commands =
    prek run --all-files --show-diff-on-failure
    prek run --all-files --show-diff-on-failure pyroma

[testenv:mypy]
skip_install = true
deps =
    -r .ci/requirements-mypy.txt
commands =
    mypy conftest.py selftest.py setup.py checks docs src winbuild Tests {posargs}
