summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_sys.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-09-08 19:51:24 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-09-08 19:51:24 (GMT)
commit3b6a6b4215950bce2a3b4bfc7d1876ab11e5f591 (patch)
treeea9d0eb92290e7565280d82bb1e2f92f5a38fb83 /Lib/test/test_sys.py
parent70897ec54c824bc66ae15678e0dc8da144227582 (diff)
downloadcpython-3b6a6b4215950bce2a3b4bfc7d1876ab11e5f591.zip
cpython-3b6a6b4215950bce2a3b4bfc7d1876ab11e5f591.tar.gz
cpython-3b6a6b4215950bce2a3b4bfc7d1876ab11e5f591.tar.bz2
Add a new private version to the builtin dict type
Issue #26058: Add a new private version to the builtin dict type, incremented at each dictionary creation and at each dictionary change. Implementation of the PEP 509.
Diffstat (limited to 'Lib/test/test_sys.py')
-rw-r--r--Lib/test/test_sys.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py
index 6084d2d..aa89506 100644
--- a/Lib/test/test_sys.py
+++ b/Lib/test/test_sys.py
@@ -937,9 +937,9 @@ class SizeofTest(unittest.TestCase):
# method-wrapper (descriptor object)
check({}.__iter__, size('2P'))
# dict
- check({}, size('n2P') + calcsize('2nP2n') + 8 + (8*2//3)*calcsize('n2P'))
+ check({}, size('n2P') + 8 + calcsize('2nP2n') + 8 + (8*2//3)*calcsize('n2P'))
longdict = {1:1, 2:2, 3:3, 4:4, 5:5, 6:6, 7:7, 8:8}
- check(longdict, size('n2P') + calcsize('2nP2n') + 16 + (16*2//3)*calcsize('n2P'))
+ check(longdict, size('n2P') + 8 + calcsize('2nP2n') + 16 + (16*2//3)*calcsize('n2P'))
# dictionary-keyview
check({}.keys(), size('P'))
# dictionary-valueview
@@ -1103,7 +1103,7 @@ class SizeofTest(unittest.TestCase):
class newstyleclass(object): pass
check(newstyleclass, s)
# dict with shared keys
- check(newstyleclass().__dict__, size('n2P' + '2nP2n'))
+ check(newstyleclass().__dict__, size('n2P' + '2nP2n') + 8)
# unicode
# each tuple contains a string and its expected character size
# don't put any static strings here, as they may contain