Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'main' into pdb-allow-restart
  • Loading branch information
gaogaotiantian authored Sep 25, 2024
commit 78e2e66650f340e388084d9236f9e13ce3b9790a
15 changes: 13 additions & 2 deletions Lib/test/test_pdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -916,12 +916,23 @@ def test_pdb_restart_command():
> <doctest test.test_pdb.test_pdb_restart_command[0]>(2)test_function()
-> import pdb; pdb.Pdb(nosigint=True, readrc=False, mode='inline').set_trace()
(Pdb) restart
*** run/restart command is not allowed with inline breakpoints.
Use the command line interface if you want to restart your program
*** run/restart command is disabled in inline breakpoints.
Use the command line interface to enable restarting your program
e.g. "python -m pdb myscript.py"
(Pdb) continue
"""

def test_pdb_commands_with_set_trace():
"""Test that commands can be passed to Pdb.set_trace()

>>> def test_function():
... x = 1
... import pdb; pdb.Pdb(nosigint=True, readrc=False).set_trace(commands=['p x', 'c'])

>>> test_function()
1
"""


# skip this test if sys.flags.no_site = True;
# exit() isn't defined unless there's a site module.
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.