-
-
Notifications
You must be signed in to change notification settings - Fork 440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
coverage report with skip covered: column widths still based on hidden filenames #524
Comments
Original comment by Anthony Sottile (Bitbucket: asottile, GitHub: asottile) Here's the start of a patch, I'd need to write tests though (and relearn mercurial) $ git diff
diff --git a/coverage/summary.py b/coverage/summary.py
index [b0fa71a (bb)](https://bitbucket.org/ned/coveragepy/commits/b0fa71a)..cdd8851 [100644 (bb)](https://bitbucket.org/ned/coveragepy/commits/100644)
--- a/coverage/summary.py
+++ b/coverage/summary.py
@@ -28,7 +28,16 @@ class SummaryReporter(Reporter):
file_reporters = self.find_file_reporters(morfs)
# Prepare the formatting strings, header, and column sorting.
- max_name = max([len(fr.relative_filename()) for fr in file_reporters] + [5])
+ max_name = max(
+ [5] + [
+ len(fr.relative_filename())
+ for fr in file_reporters
+ if not (
+ self.config.skip_covered and
+ self.coverage._analyze(fr).numbers.n_missing == 0
+ )
+ ]
+ )
fmt_name = u"%%- %ds " % max_name
fmt_err = u"%s %s: %s"
fmt_skip_covered = u"\n%s file%s skipped due to complete coverage."
|
Original comment by Loic Dachary (Bitbucket: dachary, GitHub: dachary) @asottile here it is : https://bitbucket.org/ned/coveragepy/pull-requests/98/report-must-ignore-skipped-files-524/diff . Would you have time to review it ? |
Fixed in 6d6ddf50dd7f (bb), thanks Loïc! |
This fix was released as part of Coverage.py 4.3. |
Originally reported by Anthony Sottile (Bitbucket: asottile, GitHub: asottile)
Ends up with a little silly things like:
The text was updated successfully, but these errors were encountered: