FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-102864: Add switching frame test for pdb by gaogaotiantian · Pull Request #119564 · python/cpython · GitHub

/ cpython Public
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
16 changes: 15 additions & 1 deletion Lib/test/test_pdb.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -2555,7 +2555,7 @@ def test_pdb_issue_gh_94215():
def test_pdb_issue_gh_101673():
"""See GH-101673

Make sure ll won't revert local variable assignment
Make sure ll and switching frames won't revert local variable assignment

>>> def test_function():
... a = 1
Expand All @@ -2565,6 +2565,10 @@ def test_pdb_issue_gh_101673():
... '!a = 2',
... 'll',
... 'p a',
... 'u',
Comment thread
gaogaotiantian marked this conversation as resolved.
... 'p a',
... 'd',
... 'p a',
... 'continue'
... ]):
... test_function()
Expand All @@ -2577,6 +2581,16 @@ def test_pdb_issue_gh_101673():
3 -> import pdb; pdb.Pdb(nosigint=True, readrc=False).set_trace()
(Pdb) p a
2
(Pdb) u
> <doctest test.test_pdb.test_pdb_issue_gh_101673[1]>(11)<module>()
-> test_function()
(Pdb) p a
*** NameError: name 'a' is not defined
(Pdb) d
> <doctest test.test_pdb.test_pdb_issue_gh_101673[0]>(3)test_function()
-> import pdb; pdb.Pdb(nosigint=True, readrc=False).set_trace()
(Pdb) p a
2
(Pdb) continue
"""

Expand Down

Back | FazBrowse Home | New Git URL