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
{{ message }}
Repository navigation
"Jump to the function exit" in lcov report with multiline conditional #1875
This test module contains a very simple multi-line controlling expression for an if statement.
def fun(x):
if (
x
):
print("got here")
For some reason, the way the if statement is formatted causes the arc description engine to fail to pick up the name of the function. In an LCOV report we get these branch records for line 2:
BRDA:2,0,jump to line 5,-
BRDA:2,0,jump to the function exit,-
The smallest change that makes the problem go away is to move the token x to line 2 without changing anything else, i.e.
def fun(x):
if (x
):
print("got here")
Then the branch records correctly identify the function:
BRDA:2,0,jump to line 5,-
BRDA:2,0,return from function 'fun',-
Activity
fix: multi-line conditions used to ruin branch descriptions. #1875
fix: multi-line conditions used to ruin branch descriptions. #1875
fix: multi-line statements no longer confuse branch target descriptio…
fix: multi-line statements no longer confuse branch target descriptio…
fix: multi-line statements no longer confuse branch target descriptio…
nedbat commentedon Dec 24, 2024
This is fixed in commit c85eaba.
nedbat commentedon Dec 26, 2024
This is now released as part of coverage 7.6.10.