mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
gh-133703: dict: fix calculate_log2_keysize() (GH-133809)
(cherry picked from commit 92337f666e)
This commit is contained in:
parent
26b6ab49e4
commit
f0a88e2ce5
3 changed files with 6 additions and 7 deletions
|
|
@ -1120,10 +1120,8 @@ class DictTest(unittest.TestCase):
|
|||
a = C()
|
||||
a.x = 1
|
||||
d = a.__dict__
|
||||
before_resize = sys.getsizeof(d)
|
||||
d[2] = 2 # split table is resized to a generic combined table
|
||||
|
||||
self.assertGreater(sys.getsizeof(d), before_resize)
|
||||
self.assertEqual(list(d), ['x', 2])
|
||||
|
||||
def test_iterator_pickling(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue