diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index e356624af04e7e..ee8958f5e3577f 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -1587,7 +1587,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__}