yield in loop confuses branch coverage · Issue #324 · nedbat/coveragepy (original) (raw)
def gen(inp):
for n in inp:
yield (i * 2 for i in range(n))
list(gen([1,2,3]))
Running this with --branch gives strange results. "2 partial branches", but only line 3 is marked, and it's marked with "2 exit".