-
-
Notifications
You must be signed in to change notification settings - Fork 448
Coverage results change under Python 3.10 #1106
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
Comments
Thanks for being in the vanguard testing with 3.10! I've made a few changes to adapt to the PEP 626 changes in 3.10. Those changes are on my master now, but are for 3.10a4+. Would you be able to try the master of coverage.py to see if it works right for you on 3.10? |
Thanks for creating a great utility! Alas, master is still missing the branch. Interestingly enough, if I add any statement (including
The 3.10.0a4 trace includes |
I adapted your original reproducer into a single file: https://gist.github.com/nedbat/d19b0870267fc8ab6717d44138daf8b7 (just removing "simple." everywhere). When I run this with commit a09b171 of coverage.py, and commit d16f6176ab of CPython (which is beyond 3.10a4), I get 100% coverage. There was more PEP 626 work done in CPython after 3.10a4 was marked, maybe that explains our different results? |
Ah ... didn't notice the "plus part" of 3.10.0a4+. That makes sense. I pulled cpython/master and rebuilt. Works like a charm then. There are a few commits between now and then that fixed defects around line numbering so it was probably addressed in between. Thanks again. |
I've been testing with Python 3.10a4 and noticed a case where code coverage differs in 3.10. The branch from line 5->9 is not marked as covered when
fetch_result
is False.The coverage miss seems to be related to the branch coming out of the
try
-except
block.To Reproduce
The minimal test case that I have come up with is:
Output from Python 3.9
Output from Python 3.10
The text was updated successfully, but these errors were encountered: