summaryrefslogtreecommitdiff
path: root/Lib/test/test_reprlib.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_reprlib.py')
-rw-r--r--Lib/test/test_reprlib.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_reprlib.py b/Lib/test/test_reprlib.py
index a328810c21..0555b71bbf 100644
--- a/Lib/test/test_reprlib.py
+++ b/Lib/test/test_reprlib.py
@@ -203,9 +203,9 @@ class ReprTests(unittest.TestCase):
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