Skip to content

Commit

Permalink
Bug: Fix rm api add wrong objects bug
Browse files Browse the repository at this point in the history
  • Loading branch information
yanghua committed Sep 25, 2024
1 parent 00ed67e commit 89d10b0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tosfs/tests/test_tosfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 89d10b0

Please sign in to comment.