Skip to content

Commit

Permalink
Switch test runner to pytest
Browse files Browse the repository at this point in the history
And add generation of coverage reports while I'm at it.
  • Loading branch information
lunkwill42 authored and hmpf committed Oct 20, 2023
1 parent 72528db commit 3f3d449
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ src/zinolib/version.py
build
dist
htmlcov
reports/

debian/changelog

Expand Down
6 changes: 4 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,18 @@ commands =
passenv = DATABASE_URL

deps =
coverage
pytest
pytest-cov

setenv =
LC_ALL=C.UTF-8
LANG=C.UTF-8
PYTHONPATH = {toxinidir}/src
PYTHONWARNINGS=once::DeprecationWarning

usedevelop = True
commands =
coverage run -m unittest {posargs}
pytest -o junit_suite_name="{envname} unit tests" --cov={toxinidir}/src --cov-report=xml:reports/{envname}/coverage.xml --junitxml=reports/{envname}/unit-results.xml --verbose {posargs}

[coverage:run]
source = ./src/.
Expand Down

0 comments on commit 3f3d449

Please sign in to comment.