Skip to content

[WIP] Python provider: report partial lines and percentage from coveragepy #29

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

blueyed
Copy link
Contributor

@blueyed blueyed commented Apr 21, 2018

Would make sense to squash-merge probably.

Uses a private interface with coveragepy (see nedbat/coveragepy#44).

if has_key(l:data, 'percentage')
let l:stats.percentage = l:data.percentage
else
let l:stats.percentage = printf('%.2f%%', 100.0 * l:stats.covered / l:stats.total)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is off in case of partial lines (which needs additional information about the number of branches). That's why I've made it to use the information from Coverage.py, but it is relevant in general.

@dbarnett
Copy link
Contributor

There's a mismatch in the line counts in the test ("3/7" instead of "3/6"). Is that expected?

@blueyed
Copy link
Contributor Author

blueyed commented May 23, 2018

No, needs more work.
IIRC I've something stashed, but have to come back to it.

@blueyed blueyed changed the title Python provider: report partial lines and percentage from coveragepy [WIP] Python provider: report partial lines and percentage from coveragepy May 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants