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

Function can_quit

IPython/core/tests/test_debugger.py:192–213  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

190 '''
191
192def can_quit():
193 '''Test that quit work in ipydb
194
195 >>> old_trace = sys.gettrace()
196
197 >>> def bar():
198 ... pass
199
200 >>> with PdbTestInput([
201 ... 'quit',
202 ... ]):
203 ... debugger.Pdb().runcall(bar)
204 > <doctest ...>(2)bar()
205 1 def bar():
206 ----> 2 pass
207 <BLANKLINE>
208 ipdb> quit
209
210 Restore previous trace function, e.g. for coverage.py
211
212 >>> sys.settrace(old_trace)
213 ''&#x27;
214
215
216def can_exit():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected