MCPcopy Index your code
hub / github.com/ipython/ipython / test_skip_dt_decorator

Function test_skip_dt_decorator

tests/test_decorators.py:86–98  ·  view source on GitHub ↗

Doctest-skipping decorator should preserve the docstring.

()

Source from the content-addressed store, hash-verified

84
85
86def test_skip_dt_decorator():
87 """Doctest-skipping decorator should preserve the docstring."""
88 # Careful: 'check' must be a *verbatim* copy of the doctest_bad docstring!
89 check = """A function whose doctest we need to skip.
90
91 >>> 1+1
92 3
93 """
94
95 # Fetch the docstring from doctest_bad after decoration.
96 val = doctest_bad.__doc__
97
98 assert dedent(check) == dedent(val), "doctest_bad docstrings don't match"
99
100
101# Doctest skipping should work for class methods too

Callers

nothing calls this directly

Calls 1

dedentFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…