You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 containing async def:
Adding arc: (11, -9): "the return on line {lineno} wasn't executed", "didn't return from function 'f1'"
_code_object__FunctionDef : /home/kb/repos/pysomeip/.tox/coverage/lib/python3.8/site-packages/coverage/parser.py:1155
add_body_arcs : /home/kb/repos/pysomeip/.tox/coverage/lib/python3.8/site-packages/coverage/parser.py:690
add_arcs : /home/kb/repos/pysomeip/.tox/coverage/lib/python3.8/site-packages/coverage/parser.py:653
_handle__Try : /home/kb/repos/pysomeip/.tox/coverage/lib/python3.8/site-packages/coverage/parser.py:1059
process_return_exits : /home/kb/repos/pysomeip/.tox/coverage/lib/python3.8/site-packages/coverage/parser.py:843
add_arc : /home/kb/repos/pysomeip/.tox/coverage/lib/python3.8/site-packages/coverage/parser.py:563
If I make f1 non-async, AstArcAnalyzer finds the line with the decorator:
Adding arc: (11, -8): "the return on line {lineno} wasn't executed", "didn't return from function 'f1'"
[same stack]
The text was updated successfully, but these errors were encountered:
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: