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

Function can_exit

IPython/core/tests/test_debugger.py:216–237  ·  view source on GitHub ↗

Test that quit work in ipydb >>> old_trace = sys.gettrace() >>> def bar(): ... pass >>> with PdbTestInput([ ... 'exit', ... ]): ... debugger.Pdb().runcall(bar) > (2)bar() 1 def bar(): ----> 2 pass ipdb>

()

Source from the content-addressed store, hash-verified

214
215
216def can_exit():
217 '''Test that quit work in ipydb
218
219 >>> old_trace = sys.gettrace()
220
221 >>> def bar():
222 ... pass
223
224 >>> with PdbTestInput([
225 ... 'exit',
226 ... ]):
227 ... debugger.Pdb().runcall(bar)
228 > <doctest ...>(2)bar()
229 1 def bar():
230 ----> 2 pass
231 <BLANKLINE>
232 ipdb> exit
233
234 Restore previous trace function, e.g. for coverage.py
235
236 >>> sys.settrace(old_trace)
237 ''&#x27;
238
239
240def test_interruptible_core_debugger():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected