2014-09-23 14:08:21 +00:00
|
|
|
[tox]
|
2020-12-20 15:40:40 +00:00
|
|
|
envlist =
|
2022-01-31 21:30:18 +00:00
|
|
|
py3{10,9,8,7}
|
|
|
|
pypy3{7,8}
|
2021-03-24 22:11:28 +00:00
|
|
|
lint
|
2020-12-20 15:40:40 +00:00
|
|
|
docs
|
|
|
|
|
|
|
|
skip_missing_interpreters = true
|
2014-09-23 14:08:21 +00:00
|
|
|
|
2022-02-09 16:56:57 +00:00
|
|
|
[base]
|
|
|
|
# Benchmarking is enabled by default. Disable it in CI. Instead run
|
|
|
|
# benchmarks outside CI, via e.g. pytest --benchmark-only --benchmark-json=...
|
|
|
|
PYTEST_ADDOPTS = --benchmark-disable
|
|
|
|
# Coverage is disabled by default. Save the options here for enabling it selectively below.
|
|
|
|
COVERAGE_ENABLE = --cov=bidict --cov-config=.coveragerc --cov-report=xml
|
|
|
|
|
2014-09-23 14:08:21 +00:00
|
|
|
[testenv]
|
2021-03-24 22:11:28 +00:00
|
|
|
deps = -r requirements/tests.txt
|
2020-12-20 15:40:40 +00:00
|
|
|
commands = ./run_tests.py
|
2022-02-09 16:56:57 +00:00
|
|
|
setenv =
|
|
|
|
PYTEST_ADDOPTS = {[base]PYTEST_ADDOPTS}
|
2020-12-20 15:40:40 +00:00
|
|
|
|
2021-10-23 20:12:55 +00:00
|
|
|
# Only enable coverage for py37 and py310 by default
|
|
|
|
[testenv:py37]
|
|
|
|
setenv =
|
2022-02-09 16:56:57 +00:00
|
|
|
PYTEST_ADDOPTS = {[base]PYTEST_ADDOPTS} {[base]COVERAGE_ENABLE}
|
2021-10-23 20:12:55 +00:00
|
|
|
|
|
|
|
# Only enable coverage for py37 and py310 by default
|
|
|
|
[testenv:py310]
|
2020-12-20 15:40:40 +00:00
|
|
|
setenv =
|
2022-02-09 16:56:57 +00:00
|
|
|
PYTEST_ADDOPTS = {[base]PYTEST_ADDOPTS} {[base]COVERAGE_ENABLE}
|
2020-12-20 15:40:40 +00:00
|
|
|
|
2021-03-24 22:11:28 +00:00
|
|
|
[testenv:lint]
|
|
|
|
deps = -r requirements/lint.txt
|
2020-12-20 15:40:40 +00:00
|
|
|
skip_install = true
|
|
|
|
commands = pre-commit run --all-files --show-diff-on-failure
|
|
|
|
|
|
|
|
[testenv:docs]
|
|
|
|
deps = -r requirements/docs.txt
|
2022-02-14 23:34:20 +00:00
|
|
|
commands = sphinx-build -W --keep-going -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html
|