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

Minor bug in nesting #180

Open
iory opened this issue Apr 18, 2020 · 0 comments
Open

Minor bug in nesting #180

iory opened this issue Apr 18, 2020 · 0 comments

Comments

@iory
Copy link
Contributor

iory commented Apr 18, 2020

There is a minor bug at the nesting case.
Following is the example.

import time
import pysnooper

snoop = pysnooper.snoop()

def test():
    with snoop:
        a = 10
        with snoop:
            time.sleep(1.0)
        a = 20
        time.sleep(1.0)


test()

The output is the following.

Source path:... <ipython-input-2-9ee7fdb55b80>
22:57:41.232785 line        11         a = 10
New var:....... a = 10
22:57:41.232850 line        12         with snoop:
22:57:41.232936 line        13             time.sleep(1.0)

The debug outputs of the a = 20 and time.sleep(1.0) are vanished.
I don't think we'll use it like this, but I'll report it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant