]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
backport gvanrossum's checkin of
authorMichael W. Hudson <mwh@python.net>
Fri, 5 Apr 2002 15:42:50 +0000 (15:42 +0000)
committerMichael W. Hudson <mwh@python.net>
Fri, 5 Apr 2002 15:42:50 +0000 (15:42 +0000)
    revision 1.126 of test_descr.py

SF patch 537536 by Phillip J. Eby, fix for SF bug 535444, super()
broken w/ classmethods.

Bugfix candidate.

Lib/test/test_descr.py

index ce28cce4a08abcd12d217e7fe7db2508154a2ab1..22b9d2f39a2c5a04e0c7bdf5af44ca4c8571621c 100644 (file)
@@ -1214,6 +1214,14 @@ def classmethods():
     vereq(ff.__get__(0, int)(42), (int, 42))
     vereq(ff.__get__(0)(42), (int, 42))
 
+    # Test super() with classmethods (SF bug 535444)
+    veris(C.goo.im_self, C)
+    veris(D.goo.im_self, D)
+    veris(super(D,D).goo.im_self, D)
+    veris(super(D,d).goo.im_self, D)
+    vereq(super(D,D).goo(), (D,))
+    vereq(super(D,d).goo(), (D,))
+
 def staticmethods():
     if verbose: print "Testing static methods..."
     class C(object):