Skip to content

Commit

Permalink
Change example configs to support tox -e pyXX
Browse files Browse the repository at this point in the history
  • Loading branch information
gschaffner authored and ionelmc committed Jan 10, 2021
1 parent 151bbe3 commit 7b9feca
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
13 changes: 5 additions & 8 deletions examples/adhoc-layout/tox.ini
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
[tox]
envlist = clean,py27,py38,report
envlist = py27,py38,report

[tool:pytest]
addopts =
--cov-report=term-missing

[testenv]
commands = pytest --cov --cov-append --cov-config={toxinidir}/.coveragerc {posargs:-vv}
setenv =
py{27,38}: COVERAGE_FILE = .coverage.{envname}
commands = pytest --cov --cov-config={toxinidir}/.coveragerc {posargs:-vv}
deps =
pytest
coverage
Expand All @@ -17,7 +19,6 @@ deps =
../..

depends =
{py27,py38}: clean
report: py27,py38

# note that this is necessary to prevent the tests importing the code from your badly laid project
Expand All @@ -27,10 +28,6 @@ changedir = tests
skip_install = true
deps = coverage
commands =
coverage combine
coverage html
coverage report --fail-under=100

[testenv:clean]
skip_install = true
deps = coverage
commands = coverage erase
13 changes: 5 additions & 8 deletions examples/src-layout/tox.ini
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
[tox]
envlist = clean,py27,py38,report
envlist = py27,py38,report

[tool:pytest]
testpaths = tests
addopts =
--cov-report=term-missing

[testenv]
commands = pytest --cov --cov-append {posargs:-vv}
setenv =
py{27,38}: COVERAGE_FILE = .coverage.{envname}
commands = pytest --cov {posargs:-vv}
deps =
pytest
coverage
Expand All @@ -18,17 +20,12 @@ deps =
../..

depends =
{py27,py38}: clean
report: py27,py38

[testenv:report]
skip_install = true
deps = coverage
commands =
coverage combine
coverage html
coverage report --fail-under=100

[testenv:clean]
skip_install = true
deps = coverage
commands = coverage erase

0 comments on commit 7b9feca

Please sign in to comment.