MCPcopy Index your code
hub / github.com/python/cpython / test_envar_ignored_when_hook_is_set

Method test_envar_ignored_when_hook_is_set

Lib/test/test_builtin.py:2599–2604  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2597 mock.assert_not_called()
2598
2599 def test_envar_ignored_when_hook_is_set(self):
2600 self.env['PYTHONBREAKPOINT'] = 'sys.exit'
2601 with patch('sys.exit') as mock:
2602 sys.breakpointhook = int
2603 breakpoint()
2604 mock.assert_not_called()
2605
2606 def test_runtime_error_when_hook_is_lost(self):
2607 del sys.breakpointhook

Callers

nothing calls this directly

Calls 2

patchFunction · 0.90
assert_not_calledMethod · 0.80

Tested by

no test coverage detected