Skip to content

Commit 8207454

Browse files
gh-124703: Add extra checks for pdb quit test (#130286)
1 parent bcc9a5d commit 8207454

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Lib/test/test_pdb.py

+8
Original file line numberDiff line numberDiff line change
@@ -4299,6 +4299,14 @@ def test_quit(self):
42994299
stdout, stderr = self._run_script(script, commands)
43004300
self.assertIn("2", stdout)
43014301
self.assertIn("Quit anyway", stdout)
4302+
# Closing stdin will quit the debugger anyway so we need to confirm
4303+
# it's the quit command that does the job
4304+
# call/return event will print --Call-- and --Return--
4305+
self.assertNotIn("--", stdout)
4306+
# Normal exit should not print anything to stderr
4307+
self.assertEqual(stderr, "")
4308+
# The quit prompt should be printed exactly twice
4309+
self.assertEqual(stdout.count("Quit anyway"), 2)
43024310

43034311

43044312
@support.requires_subprocess()

0 commit comments

Comments
 (0)