Test ipdb with a very short function. >>> old_trace = sys.gettrace() >>> def bar(): ... pass Run ipdb. >>> with PdbTestInput([ ... 'continue', ... ]): ... debugger.Pdb().runcall(bar) > (2)bar() 1 def bar(): ----> 2
()
| 165 | ''' |
| 166 | |
| 167 | def test_ipdb_magics2(): |
| 168 | '''Test ipdb with a very short function. |
| 169 | |
| 170 | >>> old_trace = sys.gettrace() |
| 171 | |
| 172 | >>> def bar(): |
| 173 | ... pass |
| 174 | |
| 175 | Run ipdb. |
| 176 | |
| 177 | >>> with PdbTestInput([ |
| 178 | ... 'continue', |
| 179 | ... ]): |
| 180 | ... debugger.Pdb().runcall(bar) |
| 181 | > <doctest ...>(2)bar() |
| 182 | 1 def bar(): |
| 183 | ----> 2 pass |
| 184 | <BLANKLINE> |
| 185 | ipdb> continue |
| 186 | |
| 187 | Restore previous trace function, e.g. for coverage.py |
| 188 | |
| 189 | >>> sys.settrace(old_trace) |
| 190 | ''' |
| 191 | |
| 192 | def can_quit(): |
| 193 | '''Test that quit work in ipydb |
nothing calls this directly
no outgoing calls
no test coverage detected