mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
correct the fix for #20637; allow slot descriptor inheritance to take place before creating cached keys
This commit is contained in:
parent
0b1be1a3b1
commit
df813791db
2 changed files with 16 additions and 9 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue