diff --git a/IPython/core/debugger.py b/IPython/core/debugger.py index ad6e93e..e34a781 100644 --- a/IPython/core/debugger.py +++ b/IPython/core/debugger.py @@ -35,6 +35,7 @@ from IPython import get_ipython from IPython.utils import PyColorize, ulinecache from IPython.utils import coloransi, io, py3compat from IPython.core.excolors import exception_colors +from IPython.testing.skipdoctest import skip_doctest # See if we can use pydb. has_pydb = False @@ -91,6 +92,7 @@ class Tracer(object): while functioning acceptably (though with limitations) if outside of it. """ + @skip_doctest def __init__(self,colors=None): """Create a local debugger instance. diff --git a/IPython/core/tests/test_debugger.py b/IPython/core/tests/test_debugger.py index efaf133..f5f02e1 100644 --- a/IPython/core/tests/test_debugger.py +++ b/IPython/core/tests/test_debugger.py @@ -85,6 +85,8 @@ def test_ipdb_magics(): ... """Docstring for example_function.""" ... pass + >>> old_trace = sys.gettrace() + Create a function which triggers ipdb. >>> def trigger_ipdb(): @@ -120,10 +122,16 @@ def test_ipdb_magics(): Docstring: Docstring for ExampleClass. Constructor Docstring:Docstring for ExampleClass.__init__ ipdb> continue + + Restore previous trace function, e.g. for coverage.py + + >>> sys.settrace(old_trace) ''' def test_ipdb_magics2(): '''Test ipdb with a very short function. + + >>> old_trace = sys.gettrace() >>> def bar(): ... pass @@ -139,4 +147,8 @@ def test_ipdb_magics2(): ----> 2 pass ipdb> continue + + Restore previous trace function, e.g. for coverage.py + + >>> sys.settrace(old_trace) '''