Skip to content

Commit

Permalink
use coverage directly instead of through pytest-cov plugin
Browse files Browse the repository at this point in the history
works better with parallel coverage
  • Loading branch information
anthrotype committed Dec 10, 2020
1 parent cb957f4 commit 67dee84
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# measure 'branch' coverage in addition to 'statement' coverage
# See: http://coverage.readthedocs.org/en/coverage-4.0.3/branch.html#branch
branch = True
parallel = True
omit = tests/*

# list of directories or packages to measure
Expand Down
2 changes: 1 addition & 1 deletion test_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-r requirements.txt
pytest>=4.5.0
pytest-cov>=2.7
coverage>=5
12 changes: 6 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
# More info on pytest-cov integration: https://pytest-cov.readthedocs.io/en/latest/tox.html
# Coverage is intentionally not appended to each run because we do not have a coverage
# service set up, it should be used by the developer for local runs only.

[tox]
envlist = lint, py{36,37}-cov, coverage-report
envlist = lint, py3{6,7,8,9}, coverage-report
skip_missing_interpreters = true

[testenv]
deps =
-r test_requirements.txt
; download the latest pip, setuptools and wheel when creating the venv
download = true
commands =
pytest --cov fontmake {posargs}
coverage run --parallel-mode -m pytest {posargs}

[testenv:lint]
skip_install = true
Expand All @@ -23,4 +20,7 @@ commands =
[testenv:coverage-report]
skip_install = true
commands =
coverage combine
coverage xml
coverage report
coverage html

0 comments on commit 67dee84

Please sign in to comment.