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

6 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 __future__ import annotations 

8 

9from typing import Any 

10 

11# Copyright (C) IPython Development Team 

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

13 

14 

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

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

17 

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

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

20 etc.""" 

21 f.__skip_doctest__ = True 

22 return f