Skip to content

Commit 5a03139

Browse files
committed
Add test to agree on desired aligned behavior of ls for empty directories.
1 parent 378cae6 commit 5a03139

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

gcsfs/tests/test_core.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ def test_pickle(gcs):
163163
gcs.touch(a)
164164
assert gcs.ls(TEST_BUCKET) == gcs2.ls(TEST_BUCKET)
165165

166-
167166
def test_ls_touch(gcs):
168167
assert not gcs.exists(TEST_BUCKET + "/tmp/test")
169168

@@ -177,6 +176,14 @@ def test_ls_touch(gcs):
177176
assert {d["name"] for d in L_d} == {a, b}
178177

179178

179+
# DO NOT MERGE!
180+
# Note: We assume this test will fail. Once it does in CI, we will update the code to make it pass.
181+
# Only then can this PR be approved and merged.
182+
def test_ls_empty_dir(gcs):
183+
gcs.mkdir(TEST_BUCKET + "/test")
184+
assert gcs.ls(TEST_BUCKET + "/test", False) == []
185+
186+
180187
def test_rm(gcs):
181188
assert not gcs.exists(a)
182189
gcs.touch(a)

0 commit comments

Comments
 (0)