diff --git a/IPython/testing/tests/test_decorators.py b/IPython/testing/tests/test_decorators.py
index 8bdc471..16875c9 100644
--- a/IPython/testing/tests/test_decorators.py
+++ b/IPython/testing/tests/test_decorators.py
@@ -9,6 +9,7 @@ import sys
 # Our own
 from IPython.testing import decorators as dec
 from IPython.testing.skipdoctest import skip_doctest
+from IPython.utils.text import dedent
 
 #-----------------------------------------------------------------------------
 # Utilities
@@ -84,11 +85,13 @@ def test_skip_dt_decorator():
     """Doctest-skipping decorator should preserve the docstring.
     """
     # Careful: 'check' must be a *verbatim* copy of the doctest_bad docstring!
-    check = """A function whose doctest we need to skip.
+    check = dedent(
+        """A function whose doctest we need to skip.
 
     >>> 1+1
     3
     """
+    )
     # Fetch the docstring from doctest_bad after decoration.
     val = doctest_bad.__doc__