Show More
@@ -35,6 +35,7 b' from IPython import get_ipython' | |||
|
35 | 35 | from IPython.utils import PyColorize, ulinecache |
|
36 | 36 | from IPython.utils import coloransi, io, py3compat |
|
37 | 37 | from IPython.core.excolors import exception_colors |
|
38 | from IPython.testing.skipdoctest import skip_doctest | |
|
38 | 39 | |
|
39 | 40 | # See if we can use pydb. |
|
40 | 41 | has_pydb = False |
@@ -91,6 +92,7 b' class Tracer(object):' | |||
|
91 | 92 | while functioning acceptably (though with limitations) if outside of it. |
|
92 | 93 | """ |
|
93 | 94 | |
|
95 | @skip_doctest | |
|
94 | 96 | def __init__(self,colors=None): |
|
95 | 97 | """Create a local debugger instance. |
|
96 | 98 |
@@ -85,6 +85,8 b' def test_ipdb_magics():' | |||
|
85 | 85 | ... """Docstring for example_function.""" |
|
86 | 86 | ... pass |
|
87 | 87 | |
|
88 | >>> old_trace = sys.gettrace() | |
|
89 | ||
|
88 | 90 | Create a function which triggers ipdb. |
|
89 | 91 | |
|
90 | 92 | >>> def trigger_ipdb(): |
@@ -120,10 +122,16 b' def test_ipdb_magics():' | |||
|
120 | 122 | Docstring: Docstring for ExampleClass. |
|
121 | 123 | Constructor Docstring:Docstring for ExampleClass.__init__ |
|
122 | 124 | ipdb> continue |
|
125 | ||
|
126 | Restore previous trace function, e.g. for coverage.py | |
|
127 | ||
|
128 | >>> sys.settrace(old_trace) | |
|
123 | 129 | ''' |
|
124 | 130 | |
|
125 | 131 | def test_ipdb_magics2(): |
|
126 | 132 | '''Test ipdb with a very short function. |
|
133 | ||
|
134 | >>> old_trace = sys.gettrace() | |
|
127 | 135 | |
|
128 | 136 | >>> def bar(): |
|
129 | 137 | ... pass |
@@ -139,4 +147,8 b' def test_ipdb_magics2():' | |||
|
139 | 147 | ----> 2 pass |
|
140 | 148 | <BLANKLINE> |
|
141 | 149 | ipdb> continue |
|
150 | ||
|
151 | Restore previous trace function, e.g. for coverage.py | |
|
152 | ||
|
153 | >>> sys.settrace(old_trace) | |
|
142 | 154 | ''' |
General Comments 0
You need to be logged in to leave comments.
Login now