Skip to content

Commit 5baf90e

Browse files
[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 1f23837) Co-authored-by: Nikita Sobolev <[email protected]>
1 parent f036b35 commit 5baf90e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Lib/test/test_descr.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1594,7 +1594,11 @@ def f(cls, arg):
15941594

15951595
cm = classmethod(f)
15961596
cm_dict = {'__annotations__': {},
1597-
'__doc__': "f docstring",
1597+
'__doc__': (
1598+
"f docstring"
1599+
if support.HAVE_DOCSTRINGS
1600+
else None
1601+
),
15981602
'__module__': __name__,
15991603
'__name__': 'f',
16001604
'__qualname__': f.__qualname__}

0 commit comments

Comments
 (0)