From d9c37dc641c90b7fd414294667dcbd0b3fa542c6 Mon Sep 17 00:00:00 2001 From: Ana Rute Mendes Date: Fri, 20 Oct 2023 13:54:12 +0200 Subject: [PATCH] Add test coverage for the API --- .gitignore | 1 + api/tox.ini | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index bc064dcef..111b778d8 100644 --- a/.gitignore +++ b/.gitignore @@ -37,5 +37,6 @@ __pycache__ *.egg-info .pytest_cache *.key* +.coverage web/v2/assets/ diff --git a/api/tox.ini b/api/tox.ini index 74b43fefc..6fb6b2d14 100644 --- a/api/tox.ini +++ b/api/tox.ini @@ -23,6 +23,14 @@ basepython = python3 usedevelop = false deps = pytest >= 7.3.1, - httpx >= 0.25.0 + httpx >= 0.25.0, + pytest-cov changedir = {toxinidir} -commands = pytest -v +commands = pytest -v --cov --cov-append --cov-report=term-missing + +[testenv:report] +deps = coverage +skip_install = true +commands = + coverage report + coverage html