split table must be combined when d.popitem()
(self)
| 1040 | |
| 1041 | @support.cpython_only |
| 1042 | def test_splittable_popitem(self): |
| 1043 | """split table must be combined when d.popitem()""" |
| 1044 | a, b = self.make_shared_key_dict(2) |
| 1045 | |
| 1046 | orig_size = sys.getsizeof(a) |
| 1047 | |
| 1048 | item = a.popitem() # split table is combined |
| 1049 | self.assertEqual(item, ('z', 3)) |
| 1050 | with self.assertRaises(KeyError): |
| 1051 | del a['z'] |
| 1052 | |
| 1053 | self.assertGreater(sys.getsizeof(a), orig_size) |
| 1054 | self.assertEqual(list(a), ['x', 'y']) |
| 1055 | self.assertEqual(list(b), ['x', 'y', 'z']) |
| 1056 | |
| 1057 | @support.cpython_only |
| 1058 | def test_splittable_update(self): |
nothing calls this directly
no test coverage detected