MCPcopy Index your code
hub / github.com/python/cpython / test_handling_pdb_prompts

Method test_handling_pdb_prompts

Lib/test/test_remote_pdb.py:328–352  ·  view source on GitHub ↗

Test responding to pdb's normal prompts.

(self)

Source from the content-addressed store, hash-verified

326 )
327
328 def test_handling_pdb_prompts(self):
329 """Test responding to pdb's normal prompts."""
330 incoming = [
331 ("server", {"command_list": ["b"]}),
332 ("server", {"prompt": "(Pdb) ", "state": "pdb"}),
333 ("user", {"prompt": "(Pdb) ", "input": "lst ["}),
334 ("user", {"prompt": "... ", "input": "0 ]"}),
335 ("server", {"prompt": "(Pdb) ", "state": "pdb"}),
336 ("user", {"prompt": "(Pdb) ", "input": ""}),
337 ("server", {"prompt": "(Pdb) ", "state": "pdb"}),
338 ("user", {"prompt": "(Pdb) ", "input": "b ["}),
339 ("server", {"prompt": "(Pdb) ", "state": "pdb"}),
340 ("user", {"prompt": "(Pdb) ", "input": "! b ["}),
341 ("user", {"prompt": "... ", "input": "b ]"}),
342 ]
343 self.do_test(
344 incoming=incoming,
345 expected_outgoing=[
346 {"reply": "lst [\n0 ]"},
347 {"reply": ""},
348 {"reply": "b ["},
349 {"reply": "!b [\nb ]"},
350 ],
351 expected_state={"state": "pdb"},
352 )
353
354 def test_handling_interact_prompts(self):
355 """Test responding to pdb's interact mode prompts."""

Callers

nothing calls this directly

Calls 1

do_testMethod · 0.95

Tested by

no test coverage detected