-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathtox.ini
31 lines (31 loc) · 1.14 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
[tox]
envlist = {py37,py38,py39,py310,py311}-{win,linux}
# https://pytest-cov.readthedocs.io/en/latest/tox.html
# https://pytest-cov.readthedocs.io/en/latest/config.html
# https://coverage.readthedocs.io/en/latest/config.html
# https://coverage.readthedocs.io/en/latest/source.html#source
# This needs to be relative to the PySourceFolder as used in the CI/CD Pipeline
[coverage:run]
omit = tests/*
# From https://coverage.readthedocs.io/en/stable/excluding.html#advanced-exclusion
# Applied as: https://pytest-cov.readthedocs.io/en/latest/tox.html
[coverage:report]
exclude_also =
if __name__ == .__main__.:
if TYPE_CHECKING:
[testenv]
deps =
pytest
pytest-cov
pytest-timeout
install_command = pip install {packages}
commands = pytest tests --junitxml={env:TESTRESULTSPATH}/{envname}.xml --junit-prefix={envname} --cov=. --cov-report=xml:{env:COVRESULTSPATH} --cov-branch --cov-append
changedir = pylibCZIrw
[testenv:{py37,py38,py39,py310,py311}-linux]
platform = linux
allowlist_externals = rm
commands_post = /bin/rm -rf {envdir}
[testenv:{py37,py38,py39,py310,py311}-win]
platform = win32
allowlist_externals = cmd
commands_post = cmd /c rmdir /s /q {envdir}