[tox]
envlist = {py38,py39,py310,py311,py312}-{sqlite,postgresql}

[testenv]
usedevelop = true
extras = test
commands =
    coverage run --omit=*/tests/* -m xmlrunner discover -s tests {posargs}
commands_post =
    coverage report
    coverage xml
deps =
    coverage
    unittest-xml-reporting
    postgresql: psycopg2 >= 2.7.0
passenv = *
setenv =
    sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://}
    postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://}
    sqlite: DB_NAME={env:DB_NAME::memory:}
    postgresql: DB_NAME={env:DB_NAME:test}
