##// END OF EJS Templates
Fix clashes between debugger tests and coverage.py...
Thomas Kluyver -
Show More
@@ -35,6 +35,7 b' from IPython import get_ipython'
35 from IPython.utils import PyColorize, ulinecache
35 from IPython.utils import PyColorize, ulinecache
36 from IPython.utils import coloransi, io, py3compat
36 from IPython.utils import coloransi, io, py3compat
37 from IPython.core.excolors import exception_colors
37 from IPython.core.excolors import exception_colors
38 from IPython.testing.skipdoctest import skip_doctest
38
39
39 # See if we can use pydb.
40 # See if we can use pydb.
40 has_pydb = False
41 has_pydb = False
@@ -91,6 +92,7 b' class Tracer(object):'
91 while functioning acceptably (though with limitations) if outside of it.
92 while functioning acceptably (though with limitations) if outside of it.
92 """
93 """
93
94
95 @skip_doctest
94 def __init__(self,colors=None):
96 def __init__(self,colors=None):
95 """Create a local debugger instance.
97 """Create a local debugger instance.
96
98
@@ -85,6 +85,8 b' def test_ipdb_magics():'
85 ... """Docstring for example_function."""
85 ... """Docstring for example_function."""
86 ... pass
86 ... pass
87
87
88 >>> old_trace = sys.gettrace()
89
88 Create a function which triggers ipdb.
90 Create a function which triggers ipdb.
89
91
90 >>> def trigger_ipdb():
92 >>> def trigger_ipdb():
@@ -120,10 +122,16 b' def test_ipdb_magics():'
120 Docstring: Docstring for ExampleClass.
122 Docstring: Docstring for ExampleClass.
121 Constructor Docstring:Docstring for ExampleClass.__init__
123 Constructor Docstring:Docstring for ExampleClass.__init__
122 ipdb> continue
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 def test_ipdb_magics2():
131 def test_ipdb_magics2():
126 '''Test ipdb with a very short function.
132 '''Test ipdb with a very short function.
133
134 >>> old_trace = sys.gettrace()
127
135
128 >>> def bar():
136 >>> def bar():
129 ... pass
137 ... pass
@@ -139,4 +147,8 b' def test_ipdb_magics2():'
139 ----> 2 pass
147 ----> 2 pass
140 <BLANKLINE>
148 <BLANKLINE>
141 ipdb> continue
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