8000 gh-124703: Add extra checks for pdb quit test by gaogaotiantian · Pull Request #130286 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-124703: Add extra checks for pdb quit test #130286

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
Changes from all commits
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
Add extra checks for pdb quit test
  • Loading branch information
gaogaotiantian committed Feb 18, 2025
commit a45521fee0f22bc1c25982ec904fcd8609861a62
8 changes: 8 additions & 0 deletions Lib/test/test_pdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -4291,6 +4291,14 @@ def test_quit(self):
stdout, stderr = self._run_script(script, commands)
self.assertIn("2", stdout)
self.assertIn("Quit anyway", stdout)
# Closing stdin will quit the debugger anyway so we need to confirm
# it's the quit command that does the job
# call/return event will print --Call-- and --Return--
self.assertNotIn("--", stdout)
# Normal exit should not print anything to stderr
self.assertEqual(stderr, "")
# The quit prompt should be printed exactly twice
self.assertEqual(stdout.count("Quit anyway"), 2)


@support.requires_subprocess()
Expand Down
Loading
0