https://github.com/python/cpython/commit/1f23837277e604f41589273aeb3a10377d416510
commit: 1f23837277e604f41589273aeb3a10377d416510
branch: main
author: Nikita Sobolev <[email protected]>
committer: sobolevn <[email protected]>
date: 2024-02-11T11:00:44+03:00
summary:

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

files:
M Lib/test/test_descr.py

diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py
index beeab6cb7f254c..5404d8d3b99d5d 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -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__}

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to