diff options
author | Benjamin Peterson <benjamin@python.org> | 2010-02-06 20:14:10 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2010-02-06 20:14:10 (GMT) |
commit | 42d5947ef5263c8227e37050ff801131992bcb90 (patch) | |
tree | 9199c0a842ec0f6a569b64e25ed462f785eea40b /Lib/test | |
parent | 5749d88243cc9618dff9f829e3084d7e2b736c65 (diff) | |
download | cpython-42d5947ef5263c8227e37050ff801131992bcb90.zip cpython-42d5947ef5263c8227e37050ff801131992bcb90.tar.gz cpython-42d5947ef5263c8227e37050ff801131992bcb90.tar.bz2 |
check type_getattro for correctness in a descriptor corner case
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_descr.py | 9 |
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 |