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

Report partially covered branches as not covered #121

Merged
merged 1 commit into from Feb 14, 2017

Conversation

jvarho
Copy link
Contributor

@jvarho jvarho commented Nov 19, 2016

Since coverage.io does not currently support branch coverage separately, I would like to mark those lines with only partial branch coverage as not covered.

If branch coverage is collected, this marks partially covered lines as not covered. If this implicit approach is not preferred, I could add an option for enabling this.


This change is Reviewable

@jvarho
Copy link
Contributor Author

jvarho commented Nov 19, 2016

The failures seem to be from dependencies, not my code, right?

@coagulant
Copy link
Contributor

@jvarho hey, thank you for contribution. Unfortunately I'm not planning to maintain this project, your PR urged me to to state it explicitly #122

@jvarho
Copy link
Contributor Author

jvarho commented Nov 25, 2016

Too bad, hopefully you find someone to take over. If not, I may fork this with a subset of the functionality.

@TheKevJames
Copy link
Owner

Hey there! This repo just underwent a change in maintainers -- myself and @goanpeca will be taking over this project. Give us some time to get up-to-speed and we'll make sure to take a look at this PR soon.

Copy link
Owner

@TheKevJames TheKevJames left a comment

Choose a reason for hiding this comment

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

Other than the comment I left, this looks good to me. @goanpeca thoughts?

'coverage': [None, None, None, 1, 1, None, None, 1, None, None, None, 1, 0, None, 1, 1, 1, 0, 1]}, results[0])
assert_coverage({
'source': "# coding: utf-8\nfrom project import hello, branch\n\nif __name__ == '__main__':\n hello()\n branch(False, True)\n branch(True, True)",
'name': 'runtests.py', 'coverage': [None, 1, None, 0, 1, 1, 1]}, results[1])
Copy link
Owner

Choose a reason for hiding this comment

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

Any idea why this is [None, 1, None, 0, 1, 1, 1] when it is [None, 1, None, 1, 1, 1, 1] in the test above (diff: if __name__ line 1->0)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because __name__ is "__main__" so only the condition being true gets tested. That is the difference with branch coverage enabled that it is meant to test.

@goanpeca
Copy link

goanpeca commented Jan 9, 2017

It looks good @TheKevJames, but no time to test it right now

@TheKevJames TheKevJames merged commit b9ab703 into TheKevJames:master Feb 14, 2017
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.

None yet

4 participants