From 633f281ba09eccfe227226ffb598efb5d57d4fd9 Mon Sep 17 00:00:00 2001
From: Frederik Hennig <frederik.hennig@fau.de>
Date: Fri, 22 Nov 2024 09:42:48 +0100
Subject: [PATCH] fix coverage data collection: use pytest plugin to collect
 from subprocesses

---
 .gitlab-ci.yml | 3 +--
 pytest.ini     | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2f84f29..5ca7ae3 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -39,8 +39,7 @@ testsuite:
     - pip install "git+https://i10git.cs.fau.de/pycodegen/pystencils.git@v2.0-dev"
     - pip install -e .
   script:
-    - coverage run -m pytest -v
-    - coverage report
+    - pytest -v
     - coverage html
     - coverage xml
   coverage: '/TOTAL.*\s+(\d+%)$/'
diff --git a/pytest.ini b/pytest.ini
index 94a3a6c..8eb047c 100644
--- a/pytest.ini
+++ b/pytest.ini
@@ -3,6 +3,6 @@ testpaths = src/pystencilssfg tests/
 python_files = "test_*.py"
 #   Need to ignore the generator scripts, otherwise they would be executed
 #   during test collection
-addopts = --doctest-modules --ignore=tests/generator_scripts/scripts
+addopts = --doctest-modules --ignore=tests/generator_scripts/scripts --cov=src/pystencilssfg --cov-report=term
 
 doctest_optionflags = NORMALIZE_WHITESPACE IGNORE_EXCEPTION_DETAIL
-- 
GitLab