File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,19 @@ def test_list_by_last_modified_date(path):
6969 assert len (wr .s3 .read_json (path , last_modified_begin = begin_utc , last_modified_end = end_utc ).index ) == 6
7070
7171
72+ @pytest .mark .parametrize ("use_threads" , [True , False ])
73+ def test_delete_objects_multiple_chunks (bucket : str , path : str , use_threads : bool ) -> None :
74+ df = pd .DataFrame ({"FooBoo" : [1 , 2 , 3 ]})
75+
76+ file_paths = [f"{ path } data.csv{ i } " for i in range (10 )]
77+ for file_path in file_paths :
78+ wr .s3 .to_csv (df , file_path )
79+
80+ with patch ("awswrangler._utils.chunkify" ) as chunkify_function :
81+ chunkify_function .return_value = [[p ] for p in file_paths ]
82+ wr .s3 .delete_objects (path = file_paths , use_threads = use_threads )
83+
84+
7285def test_delete_internal_error (bucket ):
7386 response = {
7487 "Errors" : [
You can’t perform that action at this time.
0 commit comments