File tree 1 file changed +15
-1
lines changed 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -2555,7 +2555,7 @@ def test_pdb_issue_gh_94215():
2555
2555
def test_pdb_issue_gh_101673 ():
2556
2556
"""See GH-101673
2557
2557
2558
- Make sure ll won't revert local variable assignment
2558
+ Make sure ll and switching frames won't revert local variable assignment
2559
2559
2560
2560
>>> def test_function():
2561
2561
... a = 1
@@ -2565,6 +2565,10 @@ def test_pdb_issue_gh_101673():
2565
2565
... '!a = 2',
2566
2566
... 'll',
2567
2567
... 'p a',
2568
+ ... 'u',
2569
+ ... 'p a',
2570
+ ... 'd',
2571
+ ... 'p a',
2568
2572
... 'continue'
2569
2573
... ]):
2570
2574
... test_function()
@@ -2577,6 +2581,16 @@ def test_pdb_issue_gh_101673():
2577
2581
3 -> import pdb; pdb.Pdb(nosigint=True, readrc=False).set_trace()
2578
2582
(Pdb) p a
2579
2583
2
2584
+ (Pdb) u
2585
+ > <doctest test.test_pdb.test_pdb_issue_gh_101673[1]>(11)<module>()
2586
+ -> test_function()
2587
+ (Pdb) p a
2588
+ *** NameError: name 'a' is not defined
2589
+ (Pdb) d
2590
+ > <doctest test.test_pdb.test_pdb_issue_gh_101673[0]>(3)test_function()
2591
+ -> import pdb; pdb.Pdb(nosigint=True, readrc=False).set_trace()
2592
+ (Pdb) p a
2593
+ 2
2580
2594
(Pdb) continue
2581
2595
"""
2582
2596
You can’t perform that action at this time.
0 commit comments