mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
gh-102864: Add switching frame test for pdb (#119564)
This commit is contained in:
parent
0220663e26
commit
5d04cc50e5
1 changed files with 15 additions and 1 deletions
|
@ -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
|
||||
|
@ -2565,6 +2565,10 @@ def test_pdb_issue_gh_101673():
|
|||
... '!a = 2',
|
||||
... 'll',
|
||||
... 'p a',
|
||||
... 'u',
|
||||
... 'p a',
|
||||
... 'd',
|
||||
... 'p a',
|
||||
... 'continue'
|
||||
... ]):
|
||||
... test_function()
|
||||
|
@ -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
|
||||
"""
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue