Skip to content

Commit 7b9feca

Browse files
gschaffnerionelmc
authored andcommitted
Change example configs to support tox -e pyXX
1 parent 151bbe3 commit 7b9feca

File tree

2 files changed

+10
-16
lines changed

2 files changed

+10
-16
lines changed

examples/adhoc-layout/tox.ini

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
[tox]
2-
envlist = clean,py27,py38,report
2+
envlist = py27,py38,report
33

44
[tool:pytest]
55
addopts =
66
--cov-report=term-missing
77

88
[testenv]
9-
commands = pytest --cov --cov-append --cov-config={toxinidir}/.coveragerc {posargs:-vv}
9+
setenv =
10+
py{27,38}: COVERAGE_FILE = .coverage.{envname}
11+
commands = pytest --cov --cov-config={toxinidir}/.coveragerc {posargs:-vv}
1012
deps =
1113
pytest
1214
coverage
@@ -17,7 +19,6 @@ deps =
1719
../..
1820

1921
depends =
20-
{py27,py38}: clean
2122
report: py27,py38
2223

2324
# note that this is necessary to prevent the tests importing the code from your badly laid project
@@ -27,10 +28,6 @@ changedir = tests
2728
skip_install = true
2829
deps = coverage
2930
commands =
31+
coverage combine
3032
coverage html
3133
coverage report --fail-under=100
32-
33-
[testenv:clean]
34-
skip_install = true
35-
deps = coverage
36-
commands = coverage erase

examples/src-layout/tox.ini

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
[tox]
2-
envlist = clean,py27,py38,report
2+
envlist = py27,py38,report
33

44
[tool:pytest]
55
testpaths = tests
66
addopts =
77
--cov-report=term-missing
88

99
[testenv]
10-
commands = pytest --cov --cov-append {posargs:-vv}
10+
setenv =
11+
py{27,38}: COVERAGE_FILE = .coverage.{envname}
12+
commands = pytest --cov {posargs:-vv}
1113
deps =
1214
pytest
1315
coverage
@@ -18,17 +20,12 @@ deps =
1820
../..
1921

2022
depends =
21-
{py27,py38}: clean
2223
report: py27,py38
2324

2425
[testenv:report]
2526
skip_install = true
2627
deps = coverage
2728
commands =
29+
coverage combine
2830
coverage html
2931
coverage report --fail-under=100
30-
31-
[testenv:clean]
32-
skip_install = true
33-
deps = coverage
34-
commands = coverage erase

0 commit comments

Comments
 (0)