@@ -52,7 +52,7 @@ def test_select_json_object(self, testCase, sql, input_format):
5252
5353 if 'SplitRange' not in input_format and 'LineRange' not in input_format :
5454 testCase .assertEqual (self .scannedSize , file_size )
55-
55+ self . bucket . delete_object ( key )
5656 return content
5757
5858 def test_select_json_object_invalid_request (self , testCase , sql , input_format ):
@@ -235,6 +235,7 @@ def test_select_json_object_with_invalid_data(self):
235235 self .assertFalse (True , "expect to raise exception" )
236236 except oss2 .exceptions .ServerError :
237237 print ("Got the exception. Ok." )
238+ self .bucket .delete_object (key )
238239
239240 def test_select_json_object_none_range (self ):
240241 print ("test_select_json_object_none_range" )
@@ -258,6 +259,7 @@ def test_select_json_object_none_range(self):
258259 content += chunk
259260
260261 self .assertTrue (len (content ) > 0 )
262+ self .bucket .delete_object (key )
261263
262264 def test_select_json_object_parse_num_as_string (self ):
263265 key = "test_select_json_object_parse_num_as_string"
@@ -267,6 +269,7 @@ def test_select_json_object_parse_num_as_string(self):
267269 for chunk in result :
268270 content += chunk
269271 self .assertEqual (content , b"{\" a\" :123456789.123456789}\n " )
272+ self .bucket .delete_object (key )
270273
271274if __name__ == '__main__' :
272275 unittest .main ()
0 commit comments