Skip to content

Commit 3398d55

Browse files
authored
Merge pull request RustPython#3747 from fanninpm/test-reprlib-3.10
Update test_reprlib.py to CPython 3.10
2 parents 6165aad + d83c01d commit 3398d55

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Lib/test/test_reprlib.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,8 @@ def inner():
198198
r'int object at 0x[0-9A-Fa-f]+>')
199199
self.assertRegex(r(x), r'<cell at 0x.*\.\.\..*>')
200200

201+
# TODO: RUSTPYTHON
202+
@unittest.expectedFailure
201203
def test_descriptors(self):
202204
eq = self.assertEqual
203205
# method descriptors
@@ -209,9 +211,9 @@ def test_descriptors(self):
209211
class C:
210212
def foo(cls): pass
211213
x = staticmethod(C.foo)
212-
self.assertTrue(repr(x).startswith('<staticmethod object at 0x'))
214+
self.assertEqual(repr(x), f'<staticmethod({C.foo!r})>')
213215
x = classmethod(C.foo)
214-
self.assertTrue(repr(x).startswith('<classmethod object at 0x'))
216+
self.assertEqual(repr(x), f'<classmethod({C.foo!r})>')
215217

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

0 commit comments

Comments
 (0)