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>
()
| 190 | ''' |
| 191 | |
| 192 | def 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 | ''' |
| 214 | |
| 215 | |
| 216 | def can_exit(): |
nothing calls this directly
no outgoing calls
no test coverage detected