Skip to content

Commit

Permalink
fix(is_dir): return False if bucket does not exist (#107 by @yaelmi3)
Browse files Browse the repository at this point in the history
* fix(is_dir): return False if bucket does not exist

- I believe this might stem from there actually being a bucket that exists with the name provided "not-a-real-bucket"
- try generating a really unique bucket name rather than adding any assumptions about Forbidden meaning doesn't exist unless we have to
  • Loading branch information
justindujardin authored Oct 22, 2023
1 parent f95ce7c commit 4a4e69d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pathy/_tests/test_pathy.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ def test_pathy_is_dir_bucket(with_adapter: str, bucket: str) -> None:

@pytest.mark.parametrize("adapter", TEST_ADAPTERS)
def test_pathy_is_dir_bucket_not_found(with_adapter: str) -> None:
path = Pathy(f"{with_adapter}://not-a-real-bucket")
invalid_bucket = f"unknown-bucket-name-{uuid4().hex[:16]}"
path = Pathy(f"{with_adapter}://{invalid_bucket}")
assert path.is_dir() is False


Expand Down

0 comments on commit 4a4e69d

Please sign in to comment.