mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
fix for DVCFileSystem().ls()
This commit is contained in:
committed by
Ruslan Kuprieiev
parent
eb8999a86b
commit
4a2c4f76e5
@@ -173,6 +173,23 @@ def test_ls_dirty(tmp_dir, dvc):
|
||||
assert set(fs.ls("data")) == {"data/foo", "data/bar"}
|
||||
|
||||
|
||||
def test_ls_file_not_found(tmp_dir, dvc):
|
||||
tmp_dir.dvc_gen({"data": "data"})
|
||||
|
||||
fs = DVCFileSystem(repo=dvc)
|
||||
with pytest.raises(FileNotFoundError):
|
||||
fs.ls("missing")
|
||||
|
||||
|
||||
def test_ls_dir_empty(tmp_dir, dvc):
|
||||
tmp_dir.dvc_gen({"data": "data"})
|
||||
empty = tmp_dir / "empty"
|
||||
empty.mkdir()
|
||||
|
||||
fs = DVCFileSystem(repo=dvc)
|
||||
assert set(fs.ls("empty")) == set()
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"dvcfiles,extra_expected",
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user