summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_descr.py
diff options
context:
space:
mode:
authorPhillip J. Eby <pje@telecommunity.com>2004-03-25 02:19:34 (GMT)
committerPhillip J. Eby <pje@telecommunity.com>2004-03-25 02:19:34 (GMT)
commit91a968af7640348d92011e305127d5968958aff4 (patch)
tree43882cd6e010b527a36c4ca92acc193fc59002d7 /Lib/test/test_descr.py
parent2786d90617993c5958a477067b20882395de5ac9 (diff)
downloadcpython-91a968af7640348d92011e305127d5968958aff4.zip
cpython-91a968af7640348d92011e305127d5968958aff4.tar.gz
cpython-91a968af7640348d92011e305127d5968958aff4.tar.bz2
Ensure super() lookup of descriptor from classmethod works (SF #743627)
Diffstat (limited to 'Lib/test/test_descr.py')
-rw-r--r--Lib/test/test_descr.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py
index ccb9fe6..a224bb9 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -2064,6 +2064,20 @@ def supers():
vereq(dd.x, "hello")
vereq(super(DDsub, dd).x, 42)
+ # Ensure that super() lookup of descriptor from classmethod
+ # works (SF ID# 743627)
+
+ class Base(object):
+ aProp = property(lambda self: "foo")
+
+ class Sub(Base):
+ def test(klass):
+ return super(Sub,klass).aProp
+ test = classmethod(test)
+
+ veris(Sub.test(), Base.aProp)
+
+
def inherits():
if verbose: print "Testing inheritance from basic types..."