gh-115249: Fix test_descr with -OO mode (#115250)

This commit is contained in:
Nikita Sobolev 2024-02-11 11:00:44 +03:00 committed by GitHub
parent 1a6e213877
commit 1f23837277
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1594,7 +1594,11 @@ def f(cls, arg):
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__}