File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -1094,6 +1094,21 @@ def __init__(self, order):
1094
1094
d .update (o .__dict__ )
1095
1095
self .assertEqual (list (d ), ["c" , "b" , "a" ])
1096
1096
1097
+ @support .cpython_only
1098
+ def test_splittable_to_generic_combinedtable (self ):
1099
+ """split table must be correctly resized and converted to generic combined table"""
1100
+ class C :
1101
+ pass
1102
+
1103
+ a = C ()
1104
+ a .x = 1
1105
+ d = a .__dict__
1106
+ before_resize = sys .getsizeof (d )
1107
+ d [2 ] = 2 # split table is resized to a generic combined table
1108
+
1109
+ self .assertGreater (sys .getsizeof (d ), before_resize )
1110
+ self .assertEqual (list (d ), ['x' , 2 ])
1111
+
1097
1112
def test_iterator_pickling (self ):
1098
1113
for proto in range (pickle .HIGHEST_PROTOCOL + 1 ):
1099
1114
data = {1 :"a" , 2 :"b" , 3 :"c" }
You can’t perform that action at this time.
0 commit comments