diff options
Diffstat (limited to 'Lib/unittest/case.py')
-rw-r--r-- | Lib/unittest/case.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/unittest/case.py b/Lib/unittest/case.py index fa64a6e..5e5d535 100644 --- a/Lib/unittest/case.py +++ b/Lib/unittest/case.py @@ -512,7 +512,7 @@ class TestCase(object): the specified test method's docstring. """ doc = self._testMethodDoc - return doc and doc.split("\n")[0].strip() or None + return doc.strip().split("\n")[0].strip() if doc else None def id(self): |