Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_dataclass fails with -OO mode #115285

Closed
sobolevn opened this issue Feb 11, 2024 · 1 comment
Closed

test_dataclass fails with -OO mode #115285

sobolevn opened this issue Feb 11, 2024 · 1 comment
Assignees
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@sobolevn
Copy link
Member

sobolevn commented Feb 11, 2024

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

@sobolevn sobolevn added type-bug An unexpected behavior, bug, or error tests Tests in the Lib/test dir labels Feb 11, 2024
@sobolevn sobolevn self-assigned this Feb 11, 2024
sobolevn added a commit to sobolevn/cpython that referenced this issue Feb 11, 2024
@sobolevn
Copy link
Member Author

sobolevn commented Feb 11, 2024

This is the last -OO problem I could find 🎉

miss-islington pushed a commit to miss-islington/cpython that referenced this issue Feb 12, 2024
)

(cherry picked from commit 4297d73)

Co-authored-by: Nikita Sobolev <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Feb 12, 2024
)

(cherry picked from commit 4297d73)

Co-authored-by: Nikita Sobolev <[email protected]>
sobolevn added a commit that referenced this issue Feb 12, 2024
…115358)

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

Co-authored-by: Nikita Sobolev <[email protected]>
sobolevn added a commit that referenced this issue Feb 12, 2024
…115359)

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

Co-authored-by: Nikita Sobolev <[email protected]>
fsc-eriker pushed a commit to fsc-eriker/cpython that referenced this issue Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant