From 98013de7cad3182471a4a434b578d61a975cf9f3 Mon Sep 17 00:00:00 2001 From: Alex Kong Date: Thu, 17 Oct 2024 22:30:03 -0700 Subject: [PATCH] Check if the error is happening during the renaming phases --- tests/fov_watcher_test.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/fov_watcher_test.py b/tests/fov_watcher_test.py index 6d9ae94d..f76f349d 100644 --- a/tests/fov_watcher_test.py +++ b/tests/fov_watcher_test.py @@ -68,13 +68,16 @@ def _slow_copy_sample_tissue_data( tissue_path = os.path.join(COMBINED_DATA_PATH, tissue_file) if temp_bin and ".bin" in tissue_file: # copy to a temporary file with hash extension, then move to dest folder + print(f"Copying over a temporary file with hash extension on {tissue_file}") new_tissue_path = os.path.join(COMBINED_DATA_PATH, "." + tissue_file + ".aBcDeF") shutil.copy(tissue_path, new_tissue_path) shutil.copy(new_tissue_path, dest) + print(f"Removing the old tissue path at .{tissue_file}.aBcDeF") os.remove(new_tissue_path) # simulate a renaming event in dest time.sleep(delta) + print(f"Renaming back to {tissue_file}") copied_tissue_path = os.path.join(dest, "." + tissue_file + ".aBcDeF") os.rename(copied_tissue_path, os.path.join(dest, tissue_file))