8000 Test `test_inspect` fails with `-OO` · Issue #116780 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

Test test_inspect fails with -OO #116780

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

Closed
sobolevn opened this issue Mar 14, 2024 · 0 comments
Closed

Test test_inspect fails with -OO #116780

sobolevn opened this issue Mar 14, 2024 · 0 comments
Assignees
Labels
stdlib Python modules in the Lib dir tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@sobolevn
Copy link
Member
sobolevn commented Mar 14, 2024

Bug report

======================================================================
FAIL: test_class_inside_conditional (test.test_inspect.test_inspect.TestBuggyCases.test_class_inside_conditional)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/sobolev/Desktop/cpython2/Lib/test/test_inspect/test_inspect.py", line 995, in test_class_inside_conditional
    self.assertSourceEqual(mod2.cls238.cls239, 239, 240)
    ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/sobolev/Desktop/cpython2/Lib/test/test_inspect/test_inspect.py", line 550, in assertSourceEqual
    self.assertEqual(inspect.getsource(obj),
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
                     self.sourcerange(top, bottom))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: "        class cls239:\n            '''else clause 239'''\n            pass\n" != "        class cls239:\n            '''if clause cls239'''\n"
          class cls239:
-             '''else clause 239'''
?                ^^^^
+             '''if clause cls239'''
?                ^^        +++
-             pass


======================================================================
FAIL: test_base_class_have_text_signature (test.test_inspect.test_inspect.TestSignatureDefinitions.test_base_class_have_text_signature)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/sobolev/Desktop/cpython2/Lib/test/test_inspect/test_inspect.py", line 5315, in test_base_class_have_text_signature
    self.assertEqual(text_signature, '(raw, buffer_size=DEFAULT_BUFFER_SIZE)')
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: None != '(raw, buffer_size=DEFAULT_BUFFER_SIZE)'

----------------------------------------------------------------------
Ran 297 tests in 0.536s

I will send a PR.

Linked PRs

@sobolevn sobolevn added type-bug An unexpected behavior, bug, or error tests Tests in the Lib/test dir stdlib Python modules in the Lib dir labels Mar 14, 2024
@sobolevn sobolevn self-assigned this Mar 14, 2024
sobolevn added a commit to sobolevn/cpython that referenced this issue Mar 14, 2024
sobolevn added a commit to sobolevn/cpython that referenced this issue Mar 14, 2024
vstinner pushed a commit to vstinner/cpython that referenced this issue Mar 20, 2024
adorilson pushed a commit to adorilson/cpython that referenced this issue Mar 25, 2024
diegorusso pushed a commit to diegorusso/cpython that referenced this issue Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir 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
0