dvcfs: handle NotADirectoryError from datafs.ls (#9746)

* dvc_fs: ignore NotADirectoryError in ls

* deps: bump dvc-data to >= 2.6.0

* add test

---------

Co-authored-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
Dave Berenbaum
2023-07-19 20:54:55 +03:00
committed by GitHub
co-authored by Ruslan Kuprieiev
parent ea5f7d40c1
commit 41194b7975
3 changed files with 12 additions and 2 deletions
+10
View File
@@ -162,6 +162,16 @@ def test_isdir_mixed(tmp_dir, dvc):
assert not fs.isfile("dir")
def test_ls_dirty(tmp_dir, dvc):
tmp_dir.dvc_gen({"data": "data"})
(tmp_dir / "data").unlink()
tmp_dir.gen({"data": {"foo": "foo", "bar": "bar"}})
fs = DVCFileSystem(repo=dvc)
assert set(fs.ls("data")) == {"data/foo", "data/bar"}
@pytest.mark.parametrize(
"dvcfiles,extra_expected",
[