Skip to content

Update test_reprlib.py to CPython 3.10 #3747

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

Merged
merged 2 commits into from
May 26, 2022
Merged
Changes from all commits
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
6 changes: 4 additions & 2 deletions Lib/test/test_reprlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@ def inner():
r'int object at 0x[0-9A-Fa-f]+>')
self.assertRegex(r(x), r'<cell at 0x.*\.\.\..*>')

# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_descriptors(self):
eq = self.assertEqual
# method descriptors
Expand All @@ -209,9 +211,9 @@ def test_descriptors(self):
class C:
def foo(cls): pass
x = staticmethod(C.foo)
self.assertTrue(repr(x).startswith('<staticmethod object at 0x'))
self.assertEqual(repr(x), f'<staticmethod({C.foo!r})>')
x = classmethod(C.foo)
self.assertTrue(repr(x).startswith('<classmethod object at 0x'))
self.assertEqual(repr(x), f'<classmethod({C.foo!r})>')

def test_unsortable(self):
# Repr.repr() used to call sorted() on sets, frozensets and dicts
Expand Down