split table must keep correct insertion order when attributes are adding using setdefault()
(self)
| 980 | |
| 981 | @support.cpython_only |
| 982 | def test_splittable_setdefault(self): |
| 983 | """split table must keep correct insertion |
| 984 | order when attributes are adding using setdefault()""" |
| 985 | a, b = self.make_shared_key_dict(2) |
| 986 | |
| 987 | a['a'] = 1 |
| 988 | size_a = sys.getsizeof(a) |
| 989 | a['b'] = 2 |
| 990 | b.setdefault('b', 2) |
| 991 | size_b = sys.getsizeof(b) |
| 992 | b['a'] = 1 |
| 993 | |
| 994 | self.assertEqual(list(a), ['x', 'y', 'z', 'a', 'b']) |
| 995 | self.assertEqual(list(b), ['x', 'y', 'z', 'b', 'a']) |
| 996 | |
| 997 | @support.cpython_only |
| 998 | def test_splittable_del(self): |
nothing calls this directly
no test coverage detected