Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
python3.8 try-finally-return reports wrong branch coverage with async functions #964
Comments
handle decorators for AsyncFunctionDefs. Closes #964
|
This is available in 5.1: https://pypi.org/project/coverage/5.1/ |
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 htmlExpected behavior
Full branch coverage for
f1()Additional context
systrace has
frame.f_code.co_firstlinenoon the line with the@foodecorator.When
f1is async,AstArcAnalyzerfinds an arc to the line containingasync def:If I make
f1non-async,AstArcAnalyzerfinds the line with the decorator: