Skip to content

Commit

Permalink
tests: add query str passthrough test
Browse files Browse the repository at this point in the history
  • Loading branch information
ap-- committed Feb 18, 2024
1 parent 1a117b3 commit 69da855
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions upath/tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,3 +375,16 @@ def test_normalize(unnormalized, normalized):
pass
assert expected == result
assert str(expected) == str(result)


@pytest.mark.parametrize(
"uri,query_str",
[
("s3://bucket/folder?versionId=1", "?versionId=1"),
("http://example.com/abc?p=2", "?p=2"),
],
)
def test_query_string(uri, query_str):
p = UPath(uri)
assert str(p).endswith(query_str)
assert p.path.endswith(query_str)

0 comments on commit 69da855

Please sign in to comment.