-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
48 lines (41 loc) · 1.4 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
[tox]
# Environment list run by tox (-e to choose)
# Update with specific python3 version if needed
#envlist = clean_coverage, py37, py38, coverage
envlist = clean_coverage, py3, coverage
[testenv]
# Main test environment configuration
# Configure
# Needed for several python version for coverage
#setenv =
# py{37,38}: 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_coverage before py* and coverage after
# For different python versions add steps between clean_coverage and coverage steps
depends =
{py3}: clean_coverage
coverage: py3
[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 =
# Add coverage combine if several python versions !
# coverage combine
coverage html
coverage xml
[testenv:clean_coverage]
# Clean coverage environment before
deps = coverage
skip_install = true
commands = coverage erase