MCPcopy Create free account
hub / github.com/ipython/ipython / raising_input

Function raising_input

IPython/core/tests/test_debugger.py:247–252  ·  view source on GitHub ↗
(msg="", called=[0])

Source from the content-addressed store, hash-verified

245 KeyboardInterrupt cause debugging to cease.
246 """
247 def raising_input(msg="", called=[0]):
248 called[0] += 1
249 if called[0] == 1:
250 raise KeyboardInterrupt()
251 else:
252 raise AssertionError("input() should only be called once!")
253
254 with patch.object(builtins, "input", raising_input):
255 debugger.InterruptiblePdb().set_trace()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected