From: Nikita Sobolev Date: Sun, 11 Feb 2024 08:00:44 +0000 (+0300) Subject: gh-115249: Fix `test_descr` with `-OO` mode (#115250) X-Git-Tag: v3.13.0a4~87 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f23837277e604f41589273aeb3a10377d416510;p=thirdparty%2FPython%2Fcpython.git gh-115249: Fix `test_descr` with `-OO` mode (#115250) --- diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index beeab6cb7f25..5404d8d3b99d 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -1594,7 +1594,11 @@ class ClassPropertiesAndMethods(unittest.TestCase): cm = classmethod(f) cm_dict = {'__annotations__': {}, - '__doc__': "f docstring", + '__doc__': ( + "f docstring" + if support.HAVE_DOCSTRINGS + else None + ), '__module__': __name__, '__name__': 'f', '__qualname__': f.__qualname__}