Skip to content

test_dataclass fails with -OO mode #115285

@sobolevn

Description

@sobolevn

Bug report

Output:

» ./python.exe -OO Lib/test/test_dataclasses/__init__.py
.................................................................................................................................F..........................................................................................................
======================================================================
FAIL: test_existing_docstring_not_overridden (__main__.TestDocString.test_existing_docstring_not_overridden)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/sobolev/Desktop/cpython2/Lib/test/test_dataclasses/__init__.py", line 2225, in test_existing_docstring_not_overridden
    self.assertEqual(C.__doc__, "Lorem ipsum")
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'C(x: int)' != 'Lorem ipsum'
- C(x: int)
+ Lorem ipsum

I have a PR ready.

Linked PRs

Metadata

Metadata

Assignees

Labels

testsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions