-
Notifications
You must be signed in to change notification settings - Fork 7
/
tox.ini
43 lines (36 loc) · 1.13 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
[tox]
# Environment list run by tox (-e to choose)
envlist = clean,py38,py39,py310,coverage
[testenv]
# Main test environment configuration
# Configure
setenv =
py{38,39,310}: COVERAGE_FILE = .coverage.{envname}
# Main command for testing
# {posargs} can be used in tox cli see https://tox.wiki/en/latest/example/general.html
commands = pytest -o log_cli=true --junitxml=pytest-report.xml --cov-config=.coveragerc --cov --cov-append --cov-report=term-missing {posargs:-vv}
# Dependencies to install to run main command
deps =
pytest
pytest-cov
# Environment dependencies : run clean before py envs and coverage after
depends =
{py38,py39,py310}: clean
coverage: py38, py39, py310
[testenv:coverage]
# Coverage environment definition
# Do not install in this env.
skip_install = true
# Install coverage package.
deps = coverage
# Commands to run in this environment :
# combine coverage parallel results and generate coverage in html and xml.
commands =
coverage combine
coverage html
coverage xml
[testenv:clean]
# Clean coverage environment before
deps = coverage
skip_install = true
commands = coverage erase