8000 gh-124703: Change back to raising bdb.BdbQuit when exiting pdb in 'inline' mode in a REPL session by ADThomas-astro · Pull Request #130395 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-124703: Change back to raising bdb.BdbQuit when exiting pdb in 'inline' mode in a REPL session #130395

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

Merged
merged 14 commits into from
Feb 25, 2025
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
Relocate import statement
  • Loading branch information
ADThomas-astro committed Feb 24, 2025
commit c800b0f4f2a78df17e258ae66c8a038d45f38b9b
5 changes: 2 additions & 3 deletions Lib/test/test_pdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
from test.support.import_helper import import_module
from test.support.pty_helper import run_pty, FakeInput
from test.support.script_helper import kill_python
# Deferred import: from test.test_repl import spawn_repl
from unittest.mock import patch

SKIP_CORO_TESTS = False
Expand Down Expand Up @@ -4352,14 +4351,14 @@ class TestREPLSession(unittest.TestCase):
def test_return_from_inline_mode_to_REPL(self):
# GH-124703: Raise BdbQuit when exiting pdb in REPL session.
# This allows the REPL session to continue.
from test.test_repl import spawn_repl
p = spawn_repl()
user_input = """
x = 'Spam'
import pdb
pdb.set_trace(commands=['x * 3', 'q'])
x[::-1] * 3
"""
from test.test_repl import spawn_repl
p = spawn_repl()
p.stdin.write(textwrap.dedent(user_input))
output = kill_python(p)
self.assertIn('SpamSpamSpam', output)
Expand Down
0