bpo-46111: Fix unittest tests in optimized mode (GH-30163)

(cherry picked from commit 95a922b3bb)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
Miss Islington (bot) 2021-12-17 01:35:58 -08:00 committed by GitHub
parent 212014d8c4
commit 72225b5bdf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View file

@ -611,6 +611,8 @@ class Test_TestCase(unittest.TestCase, TestEquality, TestHashing):
'Tests shortDescription() for a method with a longer '
'docstring.')
@unittest.skipIf(sys.flags.optimize >= 2,
"Docstrings are omitted with -O2 and above")
def testShortDescriptionWhitespaceTrimming(self):
"""
Tests shortDescription() whitespace is trimmed, so that the first