File: tox.ini

package info (click to toggle)
bidict 0.23.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,148 kB
  • sloc: python: 1,603; makefile: 157; sh: 114; javascript: 25; xml: 9
file content (76 lines) | stat: -rw-r--r-- 2,146 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
[tox]
envlist =
  # Use "python3.X" rather than "py3X" so env names match python executable names
  python3.{12,11,10,9,8}
  pypy3.{10,9}
  benchmark
  lint
  docs
  # do not include 'coverage' so it only runs when explicitly requested

skip_missing_interpreters = true

# Keep in sync with ./dev-deps/py_ver.env:
_default_py_minor_ver = 12
_default_req_dir = dev-deps/python3.{[tox]_default_py_minor_ver}

[testenv]
deps = -r dev-deps/{envname}/test.txt
# https://hynek.me/articles/turbo-charge-tox/
package = wheel
wheel_build_env = .pkg
passenv =
  # https://docs.pytest.org/en/stable/example/simple.html
  PYTEST_ADDOPTS
  # https://docs.pytest.org/en/7.1.x/reference/reference.html#envvar-FORCE_COLOR
  FORCE_COLOR
  # https://hypothesis.readthedocs.io/en/latest/settings.html#hypothesis.settings.print_blob
  # https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables
  CI
commands =
  mypy bidict tests
  pytest

[testenv:python3.12]
base_python = py312

[testenv:python3.11]
base_python = py311

[testenv:python3.10]
base_python = py310

[testenv:python3.9]
base_python = py39

[testenv:python3.8]
base_python = py38

[testenv:benchmark]
base_python = py3{[tox]_default_py_minor_ver}
deps = -r {[tox]_default_req_dir}/test.txt
commands = pytest -n0 --benchmark-autosave tests/microbenchmarks.py

[testenv:lint]
base_python = py3{[tox]_default_py_minor_ver}
deps = pre-commit
skip_install = true
commands = pre-commit run --all-files --verbose --show-diff-on-failure

[testenv:docs]
base_python = py3{[tox]_default_py_minor_ver}
deps = -r {[tox]_default_req_dir}/docs.txt
commands = sphinx-build -Wn --keep-going -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html

[testenv:coverage]
base_python = py3{[tox]_default_py_minor_ver}
deps = -r {[tox]_default_req_dir}/test.txt
setenv =
  # https://coverage.readthedocs.io/en/7.4.0/changes.html#version-7-4-0-2023-12-27
  COVERAGE_CORE=sysmon
  # https://hynek.me/articles/turbo-charge-tox/#coverage-enable-subprocess
  COVERAGE_PROCESS_START={toxinidir}/.coveragerc
commands =
  coverage run -m pytest
  coverage combine
  coverage report