We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6165aad commit 5073bacCopy full SHA for 5073bac
Lib/test/test_reprlib.py
@@ -209,9 +209,9 @@ def test_descriptors(self):
209
class C:
210
def foo(cls): pass
211
x = staticmethod(C.foo)
212
- self.assertTrue(repr(x).startswith('<staticmethod object at 0x'))
+ self.assertEqual(repr(x), f'<staticmethod({C.foo!r})>')
213
x = classmethod(C.foo)
214
- self.assertTrue(repr(x).startswith('<classmethod object at 0x'))
+ self.assertEqual(repr(x), f'<classmethod({C.foo!r})>')
215
216
def test_unsortable(self):
217
# Repr.repr() used to call sorted() on sets, frozensets and dicts
0 commit comments