-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtox.ini
72 lines (64 loc) · 1.55 KB
/
tox.ini
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
[tox]
requires = virtualenv<20.22.0
env_list = gen,py{27,35,36,37,38,39,310,311,312,313,313t,314},badges
labels =
main = gen,py313
[testenv]
allowlist_externals = sh
deps =
mypy
install_command =
{envpython} -I -m pip install {opts} {packages}
commands =
{envpython} -m mypy src
sh -c '{envpython} -m doctest tests/test_*.txt'
[testenv:py{27}]
deps =
install_command =
{envpython} -E -s -m pip install -v {opts} {packages}
commands =
sh -c '{envpython} -m doctest tests/test_*.txt'
[testenv:py313t]
base_python = python3.13t
[testenv:py313]
allowlist_externals = mkdir
parallel_show_output = true
deps =
mypy
pytest
pytest-cov
commands_pre =
mkdir -p tmp
commands =
{envpython} -m mypy src
{envpython} -m pytest
[testenv:gen]
allowlist_externals = sh
skip_install = true
commands =
sh -c "sed -ne '/^```doctest/,/^```/{/^```doctest/d; s/^```//; p;}' README.md > tests/test_readme.txt"
sh -c "sed -ne '/^```doctest/,/^```/{/^```doctest/d; s/^```//; p;}' docs/tokenize.md > tests/test_tokenize.txt"
[testenv:badges]
allowlist_externals = genbadge,mkdir
skip_install = true
commands =
mkdir -p docs/badge
genbadge tests --local -i tmp/junit.xml -o docs/badge/tests.svg
genbadge coverage --local -i tmp/coverage.xml -o docs/badge/coverage.svg
[pytest]
testpaths = tests
addopts =
--junitxml=tmp/junit.xml
--cov=caseutil
--cov-report=term
--cov-report=html
--cov-report=xml
[coverage:run]
branch = true
data_file = tmp/.coverage
[coverage:report]
precision = 1
[coverage:html]
directory = tmp/htmlcov
[coverage:xml]
output = tmp/coverage.xml