avocado-framework / avocado

Avocado is a set of tools and libraries to help with automated testing. One can call it a test framework with benefits. Native tests are written in Python and they follow the unittest pattern, but any executable can serve as a test.
https://avocado-framework.github.io/
Other
336 stars 335 forks source link

Avocado Coverage.py behaviour doesn't correspond to documentation #5919

Closed richtja closed 3 weeks ago

richtja commented 2 months ago

Describe the bug Avocado documentation describes usage of Coverage.py with avocado. Unfortunately, the procedure mentioned in documentation is not working.

Steps to reproduce .coveragerc:

[run]
concurrency = multiprocessing
source = examples/tests/
parallel = true

Expected behavior

$coverage run -m avocado run examples/tests/
...
$coverage combine
$coverage report
Name                      Stmts   Miss  Cover
---------------------------------------------
...
---------------------------------------------
TOTAL                        91     12    87%

Current behavior

$coverage run -m avocado run examples/tests/
...
CoverageWarning: No data was collected. (no-data-collected)
$coverage combine
$coverage report

But if you set env variable COVERAGE_RUN the Coverage.py is working. We need to investigate if avocado have some bug or we just need to update our documentation.