for - if - for - else combo miscounts branch possibilities · Issue #39 · nedbat/coveragepy (original) (raw)

@nedbat

Description

@nedbat

nedbat

opened

on Dec 13, 2009

This code has an anomaly:

# In this function, "for e in info" seems to have 2 branches:
def branches_2():
    if x: 
        for e in info: 
            print(1)
    else: 
        print(2)

# In this function, "for e in info" seems to have 3 branches:
def branches_3():
    for y in a: 
        if x:
            for e in info: 
                print(1)
        else: 
            print(2)

Metadata

Metadata

Assignees

No one assigned

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions