Reuse test commands in cover target

... to maintain the commands in a single place.

Also install coverage only when needed.

Change-Id: Ibf619fce8e9af24ed6c3d581138762187fba4c8f
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
Takashi Kajinami committed 2026-10-03 02:58:00 +09:00
1 parent 97d32ef0b9
commit 673fac0348
2 files changed
+4 -2

No files matched your search

-1
View File
@@ -1,4 +1,3 @@
coverage>=5.0 # Apache-2.0
stestr>=2.0.0 # Apache-2.0
testtools>=2.2.0 # MIT
fixtures>=3.0.0 # Apache-2.0/BSD
+4 -1
View File
@@ -38,11 +38,14 @@ commands =
commands = {posargs}
[testenv:cover]
deps =
{[testenv]deps}
coverage>=5.0 # Apache-2.0
setenv =
PYTHON=coverage run --source debtcollector --parallel-mode
commands =
coverage erase
stestr run {posargs}
{[testenv]commands}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml