From 89d10b0b89d2020c64f6b3c61a7a4261be03e926 Mon Sep 17 00:00:00 2001 From: yanghua Date: Wed, 25 Sep 2024 15:41:26 +0800 Subject: [PATCH] Bug: Fix rm api add wrong objects bug --- tosfs/tests/test_tosfs.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tosfs/tests/test_tosfs.py b/tosfs/tests/test_tosfs.py index 14044ac..dc39bfa 100644 --- a/tosfs/tests/test_tosfs.py +++ b/tosfs/tests/test_tosfs.py @@ -688,9 +688,13 @@ def test_rm(tosfs: TosFileSystem, bucket: str, temporary_workspace: str) -> None f"{bucket}/{temporary_workspace}/{dir_name}/{sub_dir_name}/{sub_file_name}" ) tosfs.rm(f"{bucket}/{temporary_workspace}/{dir_name}", recursive=True) - assert not tosfs.exists(f"{bucket}/{temporary_workspace}/{dir_name}/{sub_file_name}") + assert not tosfs.exists( + f"{bucket}/{temporary_workspace}/{dir_name}/{sub_file_name}" + ) assert not tosfs.exists(f"{bucket}/{temporary_workspace}/{dir_name}/{sub_dir_name}") - assert not tosfs.exists(f"{bucket}/{temporary_workspace}/{dir_name}/{sub_dir_name}/{sub_file_name}") + assert not tosfs.exists( + f"{bucket}/{temporary_workspace}/{dir_name}/{sub_dir_name}/{sub_file_name}" + ) assert not tosfs.exists(f"{bucket}/{temporary_workspace}/{dir_name}") # Test Deletion of Non-Existent Path