Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more s3 tests #191

Merged
merged 2 commits into from
Feb 18, 2024
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)
Loading