https://github.com/python/cpython/commit/d73213423259b01216d61ff20c3dd11698145ec1
commit: d73213423259b01216d61ff20c3dd11698145ec1
branch: 3.11
author: Miss Islington (bot) <[email protected]>
committer: sobolevn <[email protected]>
date: 2024-02-12T20:21:18Z
summary:

[3.11] gh-115285: Fix `test_dataclasses` with `-OO` mode (GH-115286) (#115358)

gh-115285: Fix `test_dataclasses` with `-OO` mode (GH-115286)
(cherry picked from commit 4297d7301b97aba2e0df9f9cc5fa4010e53a8950)

Co-authored-by: Nikita Sobolev <[email protected]>

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 682f351c6bdf5b..08c685ee756b30 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
 
@@ -2143,6 +2145,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