Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d9bbeed

Browse files
committed
fix docstring for Python 3.13
1 parent bf8503e commit d9bbeed

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

IPython/testing/tests/test_decorators.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
# Our own
1010
from IPython.testing import decorators as dec
1111
from IPython.testing.skipdoctest import skip_doctest
12+
from IPython.utils.text import dedent
1213

1314
#-----------------------------------------------------------------------------
1415
# Utilities
@@ -84,11 +85,13 @@ def test_skip_dt_decorator():
8485
"""Doctest-skipping decorator should preserve the docstring.
8586
"""
8687
# Careful: 'check' must be a *verbatim* copy of the doctest_bad docstring!
87-
check = """A function whose doctest we need to skip.
88+
check = dedent(
89+
"""A function whose doctest we need to skip.
8890
8991
>>> 1+1
9092
3
9193
"""
94+
)
9295
# Fetch the docstring from doctest_bad after decoration.
9396
val = doctest_bad.__doc__
9497

0 commit comments

Comments
 (0)