Skip to content

Commit

Permalink
Merge pull request #34 from Uninett/pytest-with-reports
Browse files Browse the repository at this point in the history
Switch test runner to pytest
  • Loading branch information
hmpf authored Oct 20, 2023
2 parents 72528db + 3f3d449 commit f0ea4e0
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 f0ea4e0

Please sign in to comment.