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