correct the fix for #20637; allow slot descriptor inheritance to take place before creating cached keys

This commit is contained in:
Benjamin Peterson 2014-03-17 15:57:17 -05:00
parent 0b1be1a3b1
commit df813791db
2 changed files with 16 additions and 9 deletions

View file

@ -4414,6 +4414,14 @@ order (MRO) for bases """
self.assertRaises(TypeError, case, 1, 2, 3)
self.assertRaises(TypeError, case, 1, 2, foo=3)
def test_subclassing_does_not_duplicate_dict_descriptors(self):
class Base:
pass
class Sub(Base):
pass
self.assertIn("__dict__", Base.__dict__)
self.assertNotIn("__dict__", Sub.__dict__)
class DictProxyTests(unittest.TestCase):
def setUp(self):