[Python-checkins] r78030 - python/trunk/Lib/test/test_descr.py

benjamin.peterson python-checkins at python.org
Sat Feb 6 21:14:10 CET 2010


Author: benjamin.peterson
Date: Sat Feb 6 21:14:10 2010
New Revision: 78030
Log:
check type_getattro for correctness in a descriptor corner case
Modified:
 python/trunk/Lib/test/test_descr.py
Modified: python/trunk/Lib/test/test_descr.py
==============================================================================
--- python/trunk/Lib/test/test_descr.py	(original)
+++ python/trunk/Lib/test/test_descr.py	Sat Feb 6 21:14:10 2010
@@ -4516,6 +4516,15 @@
 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
 


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /