From 3aa9621c3966a369c4904e7aa06095e287d67cbd Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Sun, 11 Feb 2024 09:57:58 +0100 Subject: [3.11] gh-115249: Fix `test_descr` with `-OO` mode (GH-115250) (#115278) gh-115249: Fix `test_descr` with `-OO` mode (GH-115250) (cherry picked from commit 1f23837277e604f41589273aeb3a10377d416510) Co-authored-by: Nikita Sobolev --- Lib/test/test_descr.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index e356624..ee8958f 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -1587,7 +1587,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__} -- cgit v0.12