@@ -1020,7 +1020,6 @@ def test_splittable_del(self):
10201020 with self .assertRaises (KeyError ):
10211021 del a ['y' ]
10221022
1023- self .assertGreater (sys .getsizeof (a ), orig_size )
10241023 self .assertEqual (list (a ), ['x' , 'z' ])
10251024 self .assertEqual (list (b ), ['x' , 'y' , 'z' ])
10261025
@@ -1031,16 +1030,12 @@ def test_splittable_del(self):
10311030
10321031 @support .cpython_only
10331032 def test_splittable_pop (self ):
1034- """split table must be combined when d.pop(k)"""
10351033 a , b = self .make_shared_key_dict (2 )
10361034
1037- orig_size = sys .getsizeof (a )
1038-
1039- a .pop ('y' ) # split table is combined
1035+ a .pop ('y' )
10401036 with self .assertRaises (KeyError ):
10411037 a .pop ('y' )
10421038
1043- self .assertGreater (sys .getsizeof (a ), orig_size )
10441039 self .assertEqual (list (a ), ['x' , 'z' ])
10451040 self .assertEqual (list (b ), ['x' , 'y' , 'z' ])
10461041
@@ -1074,36 +1069,6 @@ def test_splittable_popitem(self):
10741069 self .assertEqual (list (a ), ['x' , 'y' ])
10751070 self .assertEqual (list (b ), ['x' , 'y' , 'z' ])
10761071
1077- @support .cpython_only
1078- def test_splittable_setattr_after_pop (self ):
1079- """setattr() must not convert combined table into split table."""
1080- # Issue 28147
1081- import _testcapi
1082-
1083- class C :
1084- pass
1085- a = C ()
1086-
1087- a .a = 1
1088- self .assertTrue (_testcapi .dict_hassplittable (a .__dict__ ))
1089-
1090- # dict.pop() convert it to combined table
1091- a .__dict__ .pop ('a' )
1092- self .assertFalse (_testcapi .dict_hassplittable (a .__dict__ ))
1093-
1094- # But C should not convert a.__dict__ to split table again.
1095- a .a = 1
1096- self .assertFalse (_testcapi .dict_hassplittable (a .__dict__ ))
1097-
1098- # Same for popitem()
1099- a = C ()
1100- a .a = 2
1101- self .assertTrue (_testcapi .dict_hassplittable (a .__dict__ ))
1102- a .__dict__ .popitem ()
1103- self .assertFalse (_testcapi .dict_hassplittable (a .__dict__ ))
1104- a .a = 3
1105- self .assertFalse (_testcapi .dict_hassplittable (a .__dict__ ))
1106-
11071072 def test_iterator_pickling (self ):
11081073 for proto in range (pickle .HIGHEST_PROTOCOL + 1 ):
11091074 data = {1 :"a" , 2 :"b" , 3 :"c" }
0 commit comments