question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Option to hide terminal coverage report on test failure

See original GitHub issue

This is a feature request related to the term/term-missing reporters. In general I would like to use

addopts =
    --cov=myproject --cov-report term-missing

so that co-developers automatically see coverage stats on stdout. However, for big projects, the coverage reports fills more than an entire page on the screen. In case all tests were successful this is fine, because here the coverage is the most relevant information for the developer. However, if a test fails, coverage isn’t so relevant and the user has to scroll back up to get information on the failed test. This can get annoying to the point that I often turn off the reporter during development.

It would be nice to have the option to report coverage to terminal only in the success case.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
blueyedcommented, Mar 25, 2019

Assuming --no-cov-on-fail is what is wanted here.

2reactions
ionelmccommented, Mar 25, 2019

@bluenote10 so it turns out there’s --no-cov-on-fail - doesn’t that solve your problem?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Command line usage — Coverage.py 6.4.4 documentation
The -i or --ignore-errors switch tells coverage.py to ignore problems encountered trying to find source files to report on.
Read more >
pytest-cov - Read the Docs
--no-cov-on-fail. Do not report coverage if test run fails. Default: False. --no-cov. Disable coverage report completely (useful for ...
Read more >
Customize pipeline configuration - GitLab Docs
You can customize how pipelines run for your project. For an overview of pipelines, watch the video GitLab CI Pipeline, Artifacts, and Environments....
Read more >
Customizing Code Coverage Analysis - Visual Studio (Windows)
Learn how to use the ExcludeFromCodeCoverageAttribute attribute to exclude test code from coverage results. You can include assemblies ...
Read more >
How can I use pytest-cov to both generate a coverage report ...
If you run with the coverage CLI directly, you can do this I think. · You have more control if you split up...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found