Skip to content

Allow one line coverage report for full coverage passing #2041

@ssbarnea

Description

@ssbarnea

Is your feature request related to a problem? Please describe.

While adding a coverage report after running tests is very useful, there is one particular case where this SPAMs the console output, the full coverage one.

At this moment, the report line looks like:

> coverage report --skip-covered
Name    Stmts   Miss  Cover   Missing
-------------------------------------
TOTAL      16      0   100%

2 files skipped due to complete coverage.

Describe the solution you'd like

I want to be able to make coverage output only one line like "Coverage passed with 100" when there is nothing to be displayed in the coverage table report (all lines skipped).

Describe alternatives you've considered

One alternative would be to write a bash script to read the coverage value and skip running coverage. Still this is not practical because these bash script would need to be integrated with the test runner (tox,..) and they would need to be maintained.

It would be more useful to just ensure that coverage report is brief when there is no useful/actionable output to be displayed.

Please note that I don't want to disable the header when coverage is partial.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions