/
tox.ini
58 lines (52 loc) · 1.18 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
# Tox (https://tox.wiki/) - run tests in isolation using virtualenv.
# Also contains config settings for tools that don't look into pyproject.toml.
[tox]
envlist =
ruff
py2{7}{,-scipy}
pypy2{7}{,-scipy}
py3{5,6,7,8,9,10,11}{,-scipy}
pypy3{8,9,10}{,-scipy}
package
clean
requires = virtualenv<20.22.0
[testenv]
description = Unit tests and test coverage
deps =
py27: mock
pypy27: mock
coverage[toml]
pytest
extras =
scipy: scipy
commands =
coverage run -m pytest {posargs}
coverage xml
coverage report
[testenv:clean]
description = Clean up bytecode and build artifacts
skip_install = true
deps = pyclean
commands = pyclean {posargs:. --debris --erase junit-report.xml --yes}
[testenv:ruff]
description = Lightening-fast linting for Python
skip_install = true
deps = ruff
commands = ruff {posargs:.}
[testenv:package]
description = Build package and check metadata (or upload package)
skip_install = true
deps =
build
twine
commands =
python -m build
twine {posargs:check --strict} dist/*
passenv =
TWINE_USERNAME
TWINE_PASSWORD
TWINE_REPOSITORY_URL
[pytest]
addopts =
--color=yes
--junitxml=junit-report.xml