Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yield lambda branch coverage #308

Closed
nedbat opened this issue May 22, 2014 · 2 comments
Closed

yield lambda branch coverage #308

nedbat opened this issue May 22, 2014 · 2 comments
Labels
branch bug Something isn't working

Comments

@nedbat
Copy link
Owner

nedbat commented May 22, 2014

Originally reported by rdn_ (Bitbucket: rdn_, GitHub: Unknown)


Version 3.7.1

coverage run --branch x.py

Missing branch:

def run():
    for i in range(10):
        yield lambda: i  # partial coverage missing jump to previous line

for f in run():
    print f()

Missing branch # 2:

def run():
    yield lambda: 100  # partial coverage missing jump to next line
    for i in range(10):
        yield lambda: i  # partial coverage missing jump to previous line

for f in run():
    print f()

Fully covered:

def run():
    yield lambda: 100  # no branch miss

for f in run():
    print f()

Wasn't sure if I was overlooking something, but given the 2nd case I think the problem is in coverage.py


@nedbat
Copy link
Owner Author

nedbat commented Apr 20, 2015

@nedbat nedbat closed this as completed Apr 20, 2015
@nedbat
Copy link
Owner Author

nedbat commented Aug 30, 2015

Issue #402 was marked as a duplicate of this issue.

@nedbat nedbat added major bug Something isn't working branch labels Jun 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant