Chore: Add coverage reporting 54/72254/2
authorAndrew Grimberg <agrimberg@linuxfoundation.org>
Thu, 12 Oct 2023 16:56:22 +0000 (09:56 -0700)
committerAndrew Grimberg <agrimberg@linuxfoundation.org>
Thu, 12 Oct 2023 17:06:05 +0000 (10:06 -0700)
Issue: RELENG-4938
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
Change-Id: Ic5589cd05033ee2f6758f10a84cb235317cc55df

pyproject.toml
tox.ini

index 89e15a0..dd05ad6 100644 (file)
@@ -104,6 +104,7 @@ openstack = [
 test = [
     "pytest==5.3.5",
     "pytest-click==0.3",
+    "pytest-cov",
     "pytest-datafiles==2.0",
     "pytest-mock==2.0.0",
     "pytest-responses==0.4.0"
diff --git a/tox.ini b/tox.ini
index bca842f..c935027 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -12,7 +12,10 @@ ignore_basepython_conflict = true
 
 [pytest]
 markers = datafiles
-addopts = -p no:warnings
+addopts =
+    -p no:warnings
+    --cov=lftools
+    --cov-report=term-missing
 
 [testenv]
 basepython = python3
@@ -20,6 +23,7 @@ basepython = python3
 deps =
     pytest==5.3.5
     pytest-click==0.3
+    pytest-cov
     pytest-datafiles==2.0
     pytest-mock==2.0.0
     pytest-responses==0.4.0