Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/IPython/testing/skipdoctest.py: 100%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

5 statements  

1"""Decorators marks that a doctest should be skipped. 

2 

3The IPython.testing.decorators module triggers various extra imports, including 

4numpy and sympy if they're present. Since this decorator is used in core parts 

5of IPython, it's in a separate module so that running IPython doesn't trigger 

6those imports.""" 

7from typing import Any 

8 

9# Copyright (C) IPython Development Team 

10# Distributed under the terms of the Modified BSD License. 

11 

12 

13def skip_doctest(f: Any) -> Any: 

14 """Decorator - mark a function or method for skipping its doctest. 

15 

16 This decorator allows you to mark a function whose docstring you wish to 

17 omit from testing, while preserving the docstring for introspection, help, 

18 etc.""" 

19 f.__skip_doctest__ = True 

20 return f