Skip to content

Commit

Permalink
ci: fix tox.ini pytest cmd to use cloudinit dir for coverage reporting (
Browse files Browse the repository at this point in the history
#5774)

The src code directory for checking code coverage in was erroneously
set to "cloud-init" instead of "cloudinit". This prevented unit test
coverage from being gathered and reported.
  • Loading branch information
a-dubs authored Oct 3, 2024
1 parent 2e866d3 commit f9082bf
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ commands =
{envpython} -m json.tool --indent 2 {[files]network_v2} {[files]network_v2}

[testenv:py3]
commands = {envpython} -m pytest -m "not hypothesis_slow" --cov=cloud-init --cov-branch {posargs:tests/unittests}
commands = {envpython} -m pytest -m "not hypothesis_slow" --cov=cloudinit --cov-branch {posargs:tests/unittests}

[testenv:py3-fast]
deps =
Expand All @@ -151,6 +151,15 @@ commands = {envpython} -m pytest \
[testenv:py3-leak]
commands = {envpython} -X tracemalloc=40 -Wall -m pytest {posargs:tests/unittests}

# generates html coverage report from the most recent pytest run
[testenv:coverage-html]
deps = {[testenv]deps}
commands = coverage html -i

# prints out the coverage report "table" from the most recent pytest run
[testenv:coverage-report]
deps = {[testenv]deps}
commands = coverage report -i

[testenv:lowest-supported]
# Tox is going to install requirements from pip. This is fine for
Expand Down

0 comments on commit f9082bf

Please sign in to comment.