summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-02-06 20:14:10 (GMT)
committerBenjamin Peterson <benjamin@python.org>2010-02-06 20:14:10 (GMT)
commit42d5947ef5263c8227e37050ff801131992bcb90 (patch)
tree9199c0a842ec0f6a569b64e25ed462f785eea40b /Lib
parent5749d88243cc9618dff9f829e3084d7e2b736c65 (diff)
downloadcpython-42d5947ef5263c8227e37050ff801131992bcb90.zip
cpython-42d5947ef5263c8227e37050ff801131992bcb90.tar.gz
cpython-42d5947ef5263c8227e37050ff801131992bcb90.tar.bz2
check type_getattro for correctness in a descriptor corner case
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_descr.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py
index ab5a1ea..b0366bd 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -4516,6 +4516,15 @@ order (MRO) for bases """
x.a = 42
self.assertEqual(x.a, 42)
+ # Also check type_getattro for correctness.
+ class Meta(type):
+ pass
+ class X(object):
+ __metaclass__ = Meta
+ X.a = 42
+ Meta.a = Descr("a")
+ self.assertEqual(X.a, 42)
+
def test_getattr_hooks(self):
# issue 4230