Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Skip failing tests
  • Loading branch information
ShaharNaveh committed Jul 11, 2025
commit 770a00079c494643acd1df41b852ff2b523c9249
12 changes: 12 additions & 0 deletions Lib/test/test_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,10 @@ def test_dunder_is_original(self):

@support.requires_docstrings
def test_attrgetter_signature(self):
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tried to mark those signature tests with unittest.expectedFailure but then the test fails on "UNEXPECTED SUCCESS", very strange.

I have tried to mess with defining __text_signature__ but I'm guessing that I'm doing something wrong because it completely ignores it. I would appreciate any suggestion that you have:)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it is a base class of multiple other tests

# TODO: RUSTPYTHON fails only when running inside COperatorTestCase
if type(self).__name__ == 'COperatorTestCase':
self.skipTest("TODO: RUSTPYTHON")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This way of handling makes hard to fix it when it is actually fixed.
I know we have a few tests having similar patterns. They must be also fixed.

A recommended pattern is adding another test function under COperatorTestCase.

class COperatoorTestCase(...):  # existing code

    # TODO: RUSTPYTHON
    def test_attrgetter_signature(self):
        super().test_attrgetter_signature()

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This way of handling makes hard to fix it when it is actually fixed. I know we have a few tests having similar patterns. They must be also fixed.

sure, np


operator = self.module
sig = inspect.signature(operator.attrgetter)
self.assertEqual(str(sig), '(attr, /, *attrs)')
Expand All @@ -613,6 +617,10 @@ def test_attrgetter_signature(self):

@support.requires_docstrings
def test_itemgetter_signature(self):
# TODO: RUSTPYTHON fails only when running inside COperatorTestCase
if type(self).__name__ == 'COperatorTestCase':
self.skipTest("TODO: RUSTPYTHON")

operator = self.module
sig = inspect.signature(operator.itemgetter)
self.assertEqual(str(sig), '(item, /, *items)')
Expand All @@ -621,6 +629,10 @@ def test_itemgetter_signature(self):

@support.requires_docstrings
def test_methodcaller_signature(self):
# TODO: RUSTPYTHON fails only when running inside COperatorTestCase
if type(self).__name__ == 'COperatorTestCase':
self.skipTest("TODO: RUSTPYTHON")

operator = self.module
sig = inspect.signature(operator.methodcaller)
self.assertEqual(str(sig), '(name, /, *args, **kwargs)')
Expand Down
Loading