Skip to content

Commit

Permalink
Core: Implement walk api
Browse files Browse the repository at this point in the history
  • Loading branch information
yanghua committed Sep 2, 2024
1 parent a5ab080 commit 724a0a4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tosfs/tests/test_tosfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,16 +385,16 @@ def test_walk(tosfs: TosFileSystem, bucket: str, temporary_workspace: str) -> No
assert file_name in walk_results[1][2]

assert (
walk_results[2][0]
== f"{bucket}/{temporary_workspace}/{dir_name}/{sub_dir_name}"
walk_results[2][0]
== f"{bucket}/{temporary_workspace}/{dir_name}/{sub_dir_name}"
)
assert walk_results[2][1] == []
assert sub_file_name in walk_results[2][2]

walk_results = list(tosfs.walk(f"{bucket}/{temporary_workspace}", topdown=False))
assert (
walk_results[0][0]
== f"{bucket}/{temporary_workspace}/{dir_name}/{sub_dir_name}"
walk_results[0][0]
== f"{bucket}/{temporary_workspace}/{dir_name}/{sub_dir_name}"
)
assert walk_results[0][1] == []
assert sub_file_name in walk_results[0][2]
Expand Down

0 comments on commit 724a0a4

Please sign in to comment.