Skip to content

Commit 294dd47

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

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,9 @@ def test_pickle(gcs):
163163
gcs.touch(a)
164164
assert gcs.ls(TEST_BUCKET) == gcs2.ls(TEST_BUCKET)
165165

166-
166+
# DO NOT MERGE!
167+
# Note: We assume this test will fail. Once it does in CI, we will update the code to make it pass.
168+
# Only then can this PR be approved and merged.
167169
def test_ls_touch(gcs):
168170
assert not gcs.exists(TEST_BUCKET + "/tmp/test")
169171

@@ -177,6 +179,11 @@ def test_ls_touch(gcs):
177179
assert {d["name"] for d in L_d} == {a, b}
178180

179181

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)