Skip to content

Generator expression is marked as not executed when it clearly is #475

@nedbat

Description

@nedbat

In this code with branch coverage, "Line of interest" is marked as partial (3->-3)

#!python
def f(a, b):
    c = (i for i in a)
    d = (j for j in b)  # Line of interest
    return dict(zip(c, d))

print(f(['a', 'b'], [1, 2]))

Happens with 4.0.3 and 4.1b2+


Metadata

Metadata

Assignees

No one assigned

    Labels

    branchbugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions