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>
()
| 214 | |
| 215 | |
| 216 | def 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 | ''' |
| 238 | |
| 239 | |
| 240 | def test_interruptible_core_debugger(): |
nothing calls this directly
no outgoing calls
no test coverage detected