1 """Decorators marks that a doctest should be skipped. 2 3 The IPython.testing.decorators module triggers various extra imports, including 4 numpy and sympy if they're present. Since this decorator is used in core parts 5 of IPython, it's in a separate module so that running IPython doesn't trigger 6 those imports.""" 7 8 # Copyright (C) IPython Development Team 9 # Distributed under the terms of the Modified BSD License. 10 11 12 def skip_doctest(f): 13 """Decorator - mark a function or method for skipping its doctest. 14 15 This decorator allows you to mark a function whose docstring you wish to 16 omit from testing, while preserving the docstring for introspection, help, 17 etc.""" 18 f.__skip_doctest__ = True 19 return f 20