@@ -50,7 +50,7 @@ def copy_transfer_cb(total_bytes_copied: int, *, file_name: str) -> None: ...
5050
5151
5252@pytest .fixture
53- async def cleanup_when_done (
53+ async def cleanup_files_closure (
5454 simcore_s3_dsm : SimcoreS3DataManager , user_id : UserID
5555) -> AsyncIterable [Callable [[SimcoreS3FileID ], None ]]:
5656 to_remove : set [SimcoreS3FileID ] = set ()
@@ -85,13 +85,13 @@ async def test__copy_path_s3_s3(
8585 node_id : NodeID ,
8686 mock_copy_transfer_cb : Callable [..., None ],
8787 sqlalchemy_async_engine : AsyncEngine ,
88- cleanup_when_done : Callable [[SimcoreS3FileID ], None ],
88+ cleanup_files_closure : Callable [[SimcoreS3FileID ], None ],
8989):
9090 def _get_dest_file_id (src : SimcoreS3FileID ) -> SimcoreS3FileID :
9191 copy_file_id = TypeAdapter (SimcoreS3FileID ).validate_python (
9292 f"{ Path (src ).parent } /the-copy"
9393 )
94- cleanup_when_done (copy_file_id )
94+ cleanup_files_closure (copy_file_id )
9595 return copy_file_id
9696
9797 async def _copy_s3_path (s3_file_id_to_copy : SimcoreS3FileID ) -> None :
@@ -240,7 +240,7 @@ async def test_create_s3_export(
240240 user_id : UserID ,
241241 paths_for_export : set [SimcoreS3FileID ],
242242 sqlalchemy_async_engine : AsyncEngine ,
243- cleanup_when_done : Callable [[SimcoreS3FileID ], None ],
243+ cleanup_files_closure : Callable [[SimcoreS3FileID ], None ],
244244):
245245 initial_fmd_count = await _get_fmds_count (sqlalchemy_async_engine )
246246 selection_to_export = _get_folder_and_files_selection (paths_for_export )
@@ -260,7 +260,7 @@ async def _progress_cb(report: ProgressReport) -> None:
260260 file_id = await simcore_s3_dsm .create_s3_export (
261261 user_id , selection_to_export , progress_bar = root_progress_bar
262262 )
263- cleanup_when_done (file_id )
263+ cleanup_files_closure (file_id )
264264 # count=2 -> the direcotory and the .zip export
265265 await _assert_meta_data_entries_count (
266266 sqlalchemy_async_engine , count = initial_fmd_count + 1
0 commit comments