diff options
author | Jeong YunWon <69878+youknowone@users.noreply.github.com> | 2022-08-23 08:58:38 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-23 08:58:38 (GMT) |
commit | ba7d4b9dc18777e1d3ad2bfc9d935e45e47ebe00 (patch) | |
tree | 41c2f55fa36abae942c5f6c25a6865b7edd9b5df | |
parent | d6259c58cbb48b8f3fbd70047f004ea19fe91e86 (diff) | |
download | cpython-ba7d4b9dc18777e1d3ad2bfc9d935e45e47ebe00.zip cpython-ba7d4b9dc18777e1d3ad2bfc9d935e45e47ebe00.tar.gz cpython-ba7d4b9dc18777e1d3ad2bfc9d935e45e47ebe00.tar.bz2 |
gh-96197: Add `del sys.breakpointhook` behavior test (gh-96198)
-rw-r--r-- | Lib/test/test_builtin.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py index 6fa5ea6..8c9c1e5 100644 --- a/Lib/test/test_builtin.py +++ b/Lib/test/test_builtin.py @@ -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): |