From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Sun, 11 Feb 2024 08:57:49 +0000 (+0100) Subject: [3.12] gh-115249: Fix `test_descr` with `-OO` mode (GH-115250) (#115277) X-Git-Tag: v3.12.3~307 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5baf90e03860b686c1a77aa7ba2baf0a1e2219bf;p=thirdparty%2FPython%2Fcpython.git [3.12] gh-115249: Fix `test_descr` with `-OO` mode (GH-115250) (#115277) gh-115249: Fix `test_descr` with `-OO` mode (GH-115250) (cherry picked from commit 1f23837277e604f41589273aeb3a10377d416510) Co-authored-by: Nikita Sobolev --- diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index bf4b8f9572df..a969f04b10a8 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -1594,7 +1594,11 @@ order (MRO) for bases """ 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__}