diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2018-10-19 23:27:45 (GMT) |
---|---|---|
committer | Victor Stinner <vstinner@redhat.com> | 2018-10-19 23:27:45 (GMT) |
commit | 6f17e51345d930ccb4db306acc12b7d1f6c5e690 (patch) | |
tree | 8405c37504100cd75d3d7f53d0f999e606fc191d /Lib | |
parent | d6a61f232619f8a8e6efacc3da5a02abaf25f090 (diff) | |
download | cpython-6f17e51345d930ccb4db306acc12b7d1f6c5e690.zip cpython-6f17e51345d930ccb4db306acc12b7d1f6c5e690.tar.gz cpython-6f17e51345d930ccb4db306acc12b7d1f6c5e690.tar.bz2 |
bpo-33712: OrderedDict only creates od_fast_nodes cache if needed (GH-7349)
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_ordered_dict.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_ordered_dict.py b/Lib/test/test_ordered_dict.py index 20efe37..a296f60 100644 --- a/Lib/test/test_ordered_dict.py +++ b/Lib/test/test_ordered_dict.py @@ -697,9 +697,9 @@ class CPythonOrderedDictTests(OrderedDictTests, unittest.TestCase): nodesize = calcsize('Pn2P') od = OrderedDict() - check(od, basicsize + 8*p + 8 + 5*entrysize) # 8byte indices + 8*2//3 * entry table + check(od, basicsize + 8 + 5*entrysize) # 8byte indices + 8*2//3 * entry table od.x = 1 - check(od, basicsize + 8*p + 8 + 5*entrysize) + check(od, basicsize + 8 + 5*entrysize) od.update([(i, i) for i in range(3)]) check(od, basicsize + 8*p + 8 + 5*entrysize + 3*nodesize) od.update([(i, i) for i in range(3, 10)]) |