skipdoctest.py 717 B

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