MCPcopy Create free account
hub / github.com/ipython/ipython / test_skip_dt_decorator

Function test_skip_dt_decorator

IPython/testing/tests/test_decorators.py:84–96  ·  view source on GitHub ↗

Doctest-skipping decorator should preserve the docstring.

()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected