Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions upath/tests/implementations/test_s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,14 @@ def s3_with_plus_chr_name(s3_server):
for dir, _, keys in s3.walk(bucket):
for key in keys:
s3.rm(f"{dir}/{key}")


def test_path_with_hash_and_space():
assert "with#hash and space" in UPath("s3://bucket/with#hash and space/abc").parts


def test_pathlib_consistent_join():
b0 = UPath("s3://mybucket/withkey/").joinpath("subfolder/myfile.txt")
b1 = UPath("s3://mybucket/withkey").joinpath("subfolder/myfile.txt")
assert b0 == b1
assert "s3://mybucket/withkey/subfolder/myfile.txt" == str(b0) == str(b1)