Skip to content
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

Display information about partial branch coverage #391

Open
moi90 opened this issue Feb 9, 2023 · 4 comments
Open

Display information about partial branch coverage #391

moi90 opened this issue Feb 9, 2023 · 4 comments

Comments

@moi90
Copy link

moi90 commented Feb 9, 2023

Is your feature request related to a problem? Please describe.
Some lines are yellow (partial), but I don't know which branch was taken and which one still needs testing.

Describe the solution you'd like
I would like to have a tooltip that displays additional coverage information.

Describe alternatives you've considered
Currently, this only is available with other tools.

@ryanluker
Copy link
Owner

Thanks for the ticket @moi90!

Do you have an example from another tool you can share?

Currently, the highlighting is the whole line or none of the line, but I wonder if it could be more "partial" as well. Meaning, if the line has a partial branch (like you alluded to) the coverage highlight would only go as far as the code had traversed.

partial-coverage-lines

Definitely something to investigate or an option as well (it might be easier to implement than other popover gui elements as I am not familiar with that area of the vscode extension api).

@moi90
Copy link
Author

moi90 commented Feb 16, 2023

pytest-coverage's html output displays some additional information:

grafik

The corresponding xml is:

<line number="40" hits="1" branch="true" condition-coverage="50% (1/2)" missing-branches="41"/>

I find the "40 ↛ 41" especially useful. Seeing the condition-coverage would be useful as well.

But I would understand if these (mostly cosmetical) improvements do not justify the effort.

@ryanluker
Copy link
Owner

@moi90 Thanks for the example, it definitely looks doable and there is other work that is similar to this (adding ui elements similar to codelens) that could be done in parallel with this.

@moi90
Copy link
Author

moi90 commented Feb 27, 2023

Cool, I'm looking forward to it! (But take your time, this extension is already a great help as it is.)

@ryanluker ryanluker added this to the 3.0.0 milestone Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants