Skip to content

Commit

Permalink
test: added coverage reporting to tox
Browse files Browse the repository at this point in the history
  • Loading branch information
15r10nk committed Mar 16, 2023
1 parent a2c92b4 commit 499dddb
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
6 changes: 6 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ install_requires =
tests=
asttokens>=2.1.0
pytest
coverage
littleutils
rich; python_version >='3.11'

Expand All @@ -42,6 +43,11 @@ executing = py.typed
[coverage:run]
relative_files = True

[coverage:report]
exclude_lines=
pragma: no cover
assert False

[bdist_wheel]
universal=1

Expand Down
16 changes: 14 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
[tox]
envlist = py27,py35,py36,py37,py38,py39,py310,py311,pypy2,pypy35,pypy36,mypy-py{27via39,35,36,37,38,39,310,311}
envlist = cov_clear,py27,py35,py36,py37,py38,py39,py310,py311,pypy2,pypy35,pypy36,mypy-py{27via39,35,36,37,38,39,310,311}

[testenv:cov_clear]
basepython=python3.10
deps = coverage
commands= coverage erase

[testenv]
commands =
pytest tests {posargs}
coverage run --branch --source tests,executing --parallel-mode -m pytest tests {posargs}
extras = tests
passenv =
FIX_EXECUTING_TESTS
ADD_EXECUTING_TESTS
EXECUTING_SLOW_TESTS

[testenv:cov_report]
basepython=python3.10
deps = coverage
commands =
coverage combine
coverage html

[testenv:generate_small_sample-py{27,35,36,37,38,39,310,311}]
extras = tests
deps = pysource-minimize
Expand Down

0 comments on commit 499dddb

Please sign in to comment.