Skip to content

Fix parsing coverage report with modern coverage #19

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

Merged

Conversation

tevansuk
Copy link
Contributor

@tevansuk tevansuk commented Feb 1, 2021

At some point, coverage has started outputting the TOTAL line even when
you are only looking at coverage of a single file. This confuses the
coverage report parsing code, which only looks at the last line.

Change it to consider any line in the output, and succeed if it finds a
line matching the file name it is looking for.

At some point, coverage has started outputting the TOTAL line even when
you are only looking at coverage of a single file. This confuses the
coverage report parsing code, which only looks at the last line.

Change it to consider any line in the output, and succeed if it finds a
line matching the file name it is looking for.
Copy link
Owner

@mgedmin mgedmin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@mgedmin
Copy link
Owner

mgedmin commented Feb 2, 2021

Once again I was surprised because I was sure I had the latest version of coverage (5.4) installed via pipx, but then I discovered an older version (5.1) installed via pip install --user into ~/.local/lib/python*/ hiding the newer one. Oops.

@mgedmin mgedmin merged commit 5308337 into mgedmin:master Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants