split table must be combined when del d[k]
(self)
| 999 | |
| 1000 | @support.cpython_only |
| 1001 | def test_splittable_del(self): |
| 1002 | """split table must be combined when del d[k]""" |
| 1003 | a, b = self.make_shared_key_dict(2) |
| 1004 | |
| 1005 | orig_size = sys.getsizeof(a) |
| 1006 | |
| 1007 | del a['y'] # split table is combined |
| 1008 | with self.assertRaises(KeyError): |
| 1009 | del a['y'] |
| 1010 | |
| 1011 | self.assertEqual(list(a), ['x', 'z']) |
| 1012 | self.assertEqual(list(b), ['x', 'y', 'z']) |
| 1013 | |
| 1014 | # Two dicts have different insertion order. |
| 1015 | a['y'] = 42 |
| 1016 | self.assertEqual(list(a), ['x', 'z', 'y']) |
| 1017 | self.assertEqual(list(b), ['x', 'y', 'z']) |
| 1018 | |
| 1019 | @support.cpython_only |
| 1020 | def test_splittable_pop(self): |
nothing calls this directly
no test coverage detected