Skip to content

Commit 5073bac

Browse files
committed
Update test_reprlib.py to CPython 3.10
1 parent 6165aad commit 5073bac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/test/test_reprlib.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,9 @@ def test_descriptors(self):
209209
class C:
210210
def foo(cls): pass
211211
x = staticmethod(C.foo)
212-
self.assertTrue(repr(x).startswith('<staticmethod object at 0x'))
212+
self.assertEqual(repr(x), f'<staticmethod({C.foo!r})>')
213213
x = classmethod(C.foo)
214-
self.assertTrue(repr(x).startswith('<classmethod object at 0x'))
214+
self.assertEqual(repr(x), f'<classmethod({C.foo!r})>')
215215

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

0 commit comments

Comments
 (0)