From 22d05e267e3763e4d3998aa40023f7f6bb8d380d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20F=C3=B6ldh=C3=A1zi?= Date: Sun, 3 Mar 2024 02:14:50 +0100 Subject: [PATCH] Enable code coverage in SonarQube and add pytest-cov dependency --- sonar-project.properties | 4 ++-- tox.ini | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sonar-project.properties b/sonar-project.properties index bc90ff0..fa12346 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -4,6 +4,6 @@ sonar.organization=tyutyutyu-1 sonar.python.version=3 sonar.sources=src sonar.dynamicAnalysis=reuseReports -; sonar.core.codeCoveragePlugin=coverage -; sonar.python.coverage.reportPaths=*coverage*.xml +sonar.core.codeCoveragePlugin=coverage +sonar.python.coverage.reportPaths=*coverage*.xml ; sonar.python.xunit.reportPath=xunit-result*.xml diff --git a/tox.ini b/tox.ini index 6e068ca..1fe828e 100644 --- a/tox.ini +++ b/tox.ini @@ -7,6 +7,7 @@ env_list = lint, type, py{310,311,312} description = run unit tests deps = pytest>=7 + pytest-cov pytest-sugar commands = coverage run --branch --module pytest {posargs:tests}