8000 gh-115249: Fix `test_descr` with `-OO` mode (#115250) · python/cpython@1407548 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1407548

Browse files
sobolevnpull[bot]
authored andcommitted
gh-115249: Fix test_descr with -OO mode (#115250)
1 parent e9e56a5 commit 1407548

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Lib/test/test_descr.py

Lines changed: 5 additions & 1 deletion
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)
0