# NOTE: for running the tests locally in `nix-shell`, it is necessary
# to spawn the `nix-shell` with `fullDeps` argument, so the command is:
# `nix-shell --arg fullDeps true`
# This will make sure all the python versions are installed.

[tox]
envlist =
    py{39,310,311,312,313}-{minimal,default,full}
    py{39,310,311,312,313}-click8{0,1}
    py{310,311,312,313}-click82

[testenv]
runner = uv-venv-runner
dependency_groups =
    !minimal: dev
extras =
    full: full
commands =
    # Working in the local directory, try to compile all bytecode
    python -m compileall src tests
    # Smoke-test trezorctl
    trezorctl --help
    # Run test suite
    !minimal: pytest -c setup.cfg --random-order tests

[testenv:py{39,310,311,312,313}-click{80,81,82}]
commands =
    click80: uv pip install "click>=8.0,<8.1"
    click81: uv pip install "click>=8.1,<8.2"
    click82: uv pip install "click>=8.2,<8.3"
    # Smoke-test trezorctl
    trezorctl --version
