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

chore(python): in .coveragerc, ignore branches that aren't really branches #1882

Closed
wants to merge 1 commit into from

Conversation

tswast
Copy link
Contributor

@tswast tswast commented Oct 17, 2023

We don't expect with pytest.raises...: "branches" to fail in passing tests.

…nches

We don't expect `with pytest.raises...:` "branches" to fail in passing tests.
@tswast tswast requested a review from a team as a code owner October 17, 2023 20:37
@parthea
Copy link
Contributor

parthea commented Oct 18, 2023

@tswast , Please could you file an issue https://github.com/googleapis/synthtool/issues/new?assignees=&labels=&projects=&template=bug_report.md with a link to an example of the problem to help with the review?

@parthea parthea assigned tswast and unassigned SurferJeffAtGoogle Oct 18, 2023
@tswast
Copy link
Contributor Author

tswast commented Oct 18, 2023

Strangely I'm not able to reproduce anymore. Maybe it was a bad "coverage" package release or something?

@tswast tswast closed this Oct 18, 2023
@tswast
Copy link
Contributor Author

tswast commented Oct 31, 2023

For future reference, I was able to reproduce when I only ran the Python 3.9 unit tests, followed by cover. With Python 3.10 unit tests, the coverage report correctly omits these "branches".

@tswast tswast deleted the tswast-patch-1 branch October 31, 2023 15:35
@parthea
Copy link
Contributor

parthea commented Oct 31, 2023

I'm not sure if it's related but I ran into a similar issue where there was a python 3.9 coverage gap when testing async code.

googleapis/gapic-generator-python#1174 (comment)
nedbat/coveragepy#1223

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.

3 participants