-
-
Notifications
You must be signed in to change notification settings - Fork 435
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
python3.8 try-finally-return reports wrong branch coverage with async functions #964
Labels
bug
Something isn't working
Comments
afflux
added a commit
to afflux/coveragepy
that referenced
this issue
Mar 24, 2020
nedbat
added a commit
that referenced
this issue
Mar 26, 2020
handle decorators for AsyncFunctionDefs. Closes #964
This is available in 5.1: https://pypi.org/project/coverage/5.1/ |
This was referenced Mar 16, 2021
This was referenced May 29, 2021
This was referenced Jun 6, 2021
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
I'm afraid I have a similar case to #707, although somehow, decorators and coroutine functions are involved.
To Reproduce
coverage run --branch test.py ; coverage html
Expected behavior
Full branch coverage for
f1()
Additional context
systrace has
frame.f_code.co_firstlineno
on the line with the@foo
decorator.When
f1
is async,AstArcAnalyzer
finds an arc to the line containingasync def
:If I make
f1
non-async,AstArcAnalyzer
finds the line with the decorator:The text was updated successfully, but these errors were encountered: