Skip to content

Commit a282fc2

Browse files
committed
another dedent test
1 parent f14a0f3 commit a282fc2

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

IPython/testing/tests/test_decorators.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,16 @@ def test_skip_dt_decorator():
8585
"""Doctest-skipping decorator should preserve the docstring.
8686
"""
8787
# Careful: 'check' must be a *verbatim* copy of the doctest_bad docstring!
88-
check = dedent(
89-
"""A function whose doctest we need to skip.
88+
check = """A function whose doctest we need to skip.
9089
9190
>>> 1+1
9291
3
9392
"""
94-
)
93+
9594
# Fetch the docstring from doctest_bad after decoration.
9695
val = doctest_bad.__doc__
97-
98-
assert check == val, "doctest_bad docstrings don't match"
96+
97+
assert dedent(check) == dedent(val), "doctest_bad docstrings don't match"
9998

10099

101100
# Doctest skipping should work for class methods too

0 commit comments

Comments
 (0)