Skip to content

Commit ee324fe

Browse files
committed
Initialize staticmethod/classmethod callables in tp_new
1 parent 80f9c47 commit ee324fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/test/test_descr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1838,7 +1838,7 @@ def test_staticmethod_new(self):
18381838

18391839
def test_classmethod_new(self):
18401840
cm = classmethod.__new__(classmethod, None)
1841-
self.assertIsInstance(repr(cm), str)
1841+
self.assertEqual(repr(cm), '<classmethod(None)>')
18421842

18431843
def test_staticmethod_func_readonly(self):
18441844
sm = staticmethod(lambda x: x)

0 commit comments

Comments
 (0)