[Python-checkins] gh-96197: Add `del sys.breakpointhook` behavior test (gh-96198)
corona10
webhook-mailer at python.org
Tue Aug 23 04:59:20 EDT 2022
https://github.com/python/cpython/commit/ba7d4b9dc18777e1d3ad2bfc9d935e45e47ebe00
commit: ba7d4b9dc18777e1d3ad2bfc9d935e45e47ebe00
branch: main
author: Jeong YunWon <69878+youknowone at users.noreply.github.com>
committer: corona10 <donghee.na92 at gmail.com>
date: 2022-08-23T17:58:38+09:00
summary:
gh-96197: Add `del sys.breakpointhook` behavior test (gh-96198)
files:
M Lib/test/test_builtin.py
diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py
index 6fa5ea67c8b3..8c9c1e506752 100644
--- a/Lib/test/test_builtin.py
+++ b/Lib/test/test_builtin.py
@@ -2072,6 +2072,11 @@ def test_envar_ignored_when_hook_is_set(self):
breakpoint()
mock.assert_not_called()
+ def test_runtime_error_when_hook_is_lost(self):
+ del sys.breakpointhook
+ with self.assertRaises(RuntimeError):
+ breakpoint()
+
@unittest.skipUnless(pty, "the pty and signal modules must be available")
class PtyTests(unittest.TestCase):
More information about the Python-checkins
mailing list