summaryrefslogtreecommitdiff
path: root/Lib/unittest/test
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/unittest/test')
-rw-r--r--Lib/unittest/test/test_case.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/unittest/test/test_case.py b/Lib/unittest/test/test_case.py
index c2401c39b9..f855c4dc00 100644
--- a/Lib/unittest/test/test_case.py
+++ b/Lib/unittest/test/test_case.py
@@ -610,6 +610,15 @@ class Test_TestCase(unittest.TestCase, TestEquality, TestHashing):
'Tests shortDescription() for a method with a longer '
'docstring.')
+ def testShortDescriptionWhitespaceTrimming(self):
+ """
+ Tests shortDescription() whitespace is trimmed, so that the first
+ line of nonwhite-space text becomes the docstring.
+ """
+ self.assertEqual(
+ self.shortDescription(),
+ 'Tests shortDescription() whitespace is trimmed, so that the first')
+
def testAddTypeEqualityFunc(self):
class SadSnake(object):
"""Dummy class for test_addTypeEqualityFunc."""