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

tests: add test for mkdir with existing gcs bucket #263

Merged
merged 2 commits into from
Aug 31, 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
15 changes: 15 additions & 0 deletions upath/tests/implementations/test_gcs.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import fsspec
import pytest

from upath import UPath
Expand Down Expand Up @@ -34,3 +35,17 @@ def test_rmdir(self):
@pytest.mark.skip
def test_makedirs_exist_ok_false(self):
pass


@skip_on_windows
def test_mkdir_in_empty_bucket(docker_gcs):
fs = fsspec.filesystem("gcs", endpoint_url=docker_gcs)
fs.mkdir("my-fresh-bucket")
assert "my-fresh-bucket/" in fs.buckets
fs.invalidate_cache()
del fs

UPath(
"gs://my-fresh-bucket/some-dir/another-dir/file",
endpoint_url=docker_gcs,
).parent.mkdir(parents=True, exist_ok=True)
Loading