mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
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:
co-authored by
Ruslan Kuprieiev
parent
ea5f7d40c1
commit
41194b7975
@@ -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",
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user