# Bug report Output: ``` » ./python.exe -OO -m test test_descr Using random seed: 1321086896 0:00:00 load avg: 3.34 Run 1 test sequentially 0:00:00 load avg: 3.34 [1/1] test_descr test test_descr failed -- Traceback (most recent call last): File "/Users/sobolev/Desktop/cpython2/Lib/test/test_descr.py", line 1601, in test_classmethods self.assertEqual(cm.__dict__, cm_dict) ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^ AssertionError: {'__module__': 'test.test_descr', '__name__':[114 chars]: {}} != {'__annotations__': {}, '__doc__': 'f docstri[123 chars]>.f'} {'__annotations__': {}, - '__doc__': None, + '__doc__': 'f docstring', '__module__': 'test.test_descr', '__name__': 'f', '__qualname__': 'ClassPropertiesAndMethods.test_classmethods.<locals>.f'} test_descr failed (1 failure) == Tests result: FAILURE == 1 test failed: test_descr Total duration: 353 ms Total tests: run=156 failures=1 skipped=2 Total test files: run=1/1 failed=1 Result: FAILURE ``` I have a fix ready. <!-- gh-linked-prs --> ### Linked PRs * gh-115250 * gh-115277 * gh-115278 <!-- /gh-linked-prs -->
Activity
pythongh-115249: Fix `test_descr` with `-OO` mode
gh-115249: Fix `test_descr` with `-OO` mode (#115250)
pythongh-115249: Fix `test_descr` with `-OO` mode (pythonGH-115250)
pythongh-115249: Fix `test_descr` with `-OO` mode (pythonGH-115250)
[3.12] gh-115249: Fix `test_descr` with `-OO` mode (GH-115250) (#115277)
[3.11] gh-115249: Fix `test_descr` with `-OO` mode (GH-115250) (#115278)
sobolevn commentedon Feb 11, 2024
Done!
pythongh-115249: Fix `test_descr` with `-OO` mode (python#115250)