https://github.com/python/cpython/commit/4297d7301b97aba2e0df9f9cc5fa4010e53a8950
commit: 4297d7301b97aba2e0df9f9cc5fa4010e53a8950
branch: main
author: Nikita Sobolev <[email protected]>
committer: sobolevn <[email protected]>
date: 2024-02-12T21:31:07+03:00
summary:

gh-115285: Fix `test_dataclasses` with `-OO` mode (#115286)

files:
M Lib/test/test_dataclasses/__init__.py

diff --git a/Lib/test/test_dataclasses/__init__.py 
b/Lib/test/test_dataclasses/__init__.py
index 272d427875ae40..ede74b0dd15ccf 100644
--- a/Lib/test/test_dataclasses/__init__.py
+++ b/Lib/test/test_dataclasses/__init__.py
@@ -22,6 +22,8 @@
 import typing       # Needed for the string "typing.ClassVar[int]" to work as 
an annotation.
 import dataclasses  # Needed for the string "dataclasses.InitVar[int]" to work 
as an annotation.
 
+from test import support
+
 # Just any custom exception we can catch.
 class CustomError(Exception): pass
 
@@ -2216,6 +2218,7 @@ def assertDocStrEqual(self, a, b):
         #  whitespace stripped.
         self.assertEqual(a.replace(' ', ''), b.replace(' ', ''))
 
+    @support.requires_docstrings
     def test_existing_docstring_not_overridden(self):
         @dataclass
         class C:

_______________________________________________
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