summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_descr.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-03-17 20:57:17 (GMT)
committerBenjamin Peterson <benjamin@python.org>2014-03-17 20:57:17 (GMT)
commitdf813791db32867634c86c33714995dfeb651099 (patch)
treeb4498a4b2bc2e5cd95f0746ec9f51b7180db6935 /Lib/test/test_descr.py
parent0b1be1a3b12c7da952b6452973ad88ae3ef3705a (diff)
downloadcpython-df813791db32867634c86c33714995dfeb651099.zip
cpython-df813791db32867634c86c33714995dfeb651099.tar.gz
cpython-df813791db32867634c86c33714995dfeb651099.tar.bz2
correct the fix for #20637; allow slot descriptor inheritance to take place before creating cached keys
Diffstat (limited to 'Lib/test/test_descr.py')
-rw-r--r--Lib/test/test_descr.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py
index 2a9e329..71d8609 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -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):