From 2781158a42a9e2738c8d9af3ff8332293120062e Mon Sep 17 00:00:00 2001 From: Noah Pendleton <2538614+noahp@users.noreply.github.com> Date: Wed, 15 Mar 2023 13:58:31 -0400 Subject: [PATCH] fix coverage paths? --- tox.ini | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 8002c98..4d4da58 100644 --- a/tox.ini +++ b/tox.ini @@ -13,7 +13,7 @@ setenv = PYTHONUNBUFFERED=1 commands = poetry install - pytest -vv --cov-report=term-missing --cov=youtrack_python_cli --cov-report=html:{envdir} {posargs} + pytest -vv --cov-branch --cov-report=term-missing --cov=youtrack_python_cli --cov-report=html:{envdir} {posargs} [testenv:py3.7] description = Quick sanity test for Python 3.7 (no snapshots, no pytest) @@ -34,4 +34,7 @@ depy = basepython = python3.11 commands = poetry install - pytest -vv --cov=youtrack_python_cli --cov-report=xml + pytest -vv --cov-branch --cov=youtrack_python_cli + # annoyingly, pytest-cov doesn't produce correct paths in the xml output. + # re-generate the coverage xml with Coverage.py, which does it right. + coverage xml