From cce6f884d37da6c63e3574ecfd6909b19dd5b630 Mon Sep 17 00:00:00 2001 From: Alejandra <90076947+alejsdev@users.noreply.github.com> Date: Tue, 9 Sep 2025 14:41:28 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Update=20coverage=20configuratio?= =?UTF-8?q?n=20and=20simplify=20test=20script=20(#1867)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/pyproject.toml | 11 +++++++++++ backend/scripts/test.sh | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/backend/pyproject.toml b/backend/pyproject.toml index d0f1c89..d72454c 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -67,3 +67,14 @@ ignore = [ [tool.ruff.lint.pyupgrade] # Preserve types, even if a file imports `from __future__ import annotations`. keep-runtime-typing = true + +[tool.coverage.run] +source = ["app"] +dynamic_context = "test_function" + +[tool.coverage.report] +show_missing = true +sort = "-Cover" + +[tool.coverage.html] +show_contexts = true diff --git a/backend/scripts/test.sh b/backend/scripts/test.sh index df23f70..bd063f7 100755 --- a/backend/scripts/test.sh +++ b/backend/scripts/test.sh @@ -3,6 +3,6 @@ set -e set -x -coverage run --source=app -m pytest -coverage report --show-missing +coverage run -m pytest +coverage report coverage html --title "${@-coverage}"