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

"continue" is wrongly marked as unexecuted #1171

Closed
NJUocean opened this issue Jun 2, 2021 · 1 comment
Closed

"continue" is wrongly marked as unexecuted #1171

NJUocean opened this issue Jun 2, 2021 · 1 comment
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@NJUocean
Copy link

NJUocean commented Jun 2, 2021

Describe the bug
"continue" is wrongly marked as unexecuted

To Reproduce

def foo():
    for i in range(2):
        a=i
        if a>0:
            b=a*2
            if b<0:
                print("executed-0")        
            continue
        if a==0:
            continue
foo()

image

Expected behavior
line 8 continue is executed, however coverage.py reports it unexecuted :(

@NJUocean NJUocean added the bug Something isn't working label Jun 2, 2021
@nedbat
Copy link
Owner

nedbat commented Jun 2, 2021

This was a long-standing issue with CPython, and a duplicate of #198. It's now fixed in CPython 3.10.

@nedbat nedbat closed this as completed Jun 2, 2021
@nedbat nedbat added the duplicate This issue or pull request already exists label Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants