Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4297d73

Browse filesBrowse files
authored
gh-115285: Fix test_dataclasses with -OO mode (#115286)
1 parent de7d67b commit 4297d73
Copy full SHA for 4297d73

File tree

Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed

‎Lib/test/test_dataclasses/__init__.py

Copy file name to clipboardExpand all lines: Lib/test/test_dataclasses/__init__.py
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
import typing # Needed for the string "typing.ClassVar[int]" to work as an annotation.
2323
import dataclasses # Needed for the string "dataclasses.InitVar[int]" to work as an annotation.
2424

25+
from test import support
26+
2527
# Just any custom exception we can catch.
2628
class CustomError(Exception): pass
2729

@@ -2216,6 +2218,7 @@ def assertDocStrEqual(self, a, b):
22162218
# whitespace stripped.
22172219
self.assertEqual(a.replace(' ', ''), b.replace(' ', ''))
22182220

2221+
@support.requires_docstrings
22192222
def test_existing_docstring_not_overridden(self):
22202223
@dataclass
22212224
class C:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.