gh-96197: Add del sys.breakpointhook behavior test (gh-96198)

This commit is contained in:
Jeong YunWon 2022-08-23 17:58:38 +09:00 committed by GitHub
parent d6259c58cb
commit ba7d4b9dc1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2072,6 +2072,11 @@ class TestBreakpoint(unittest.TestCase):
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):