dvc.fs: rename fs.utils to fs.generic

In the spirit of fsspec.generic, it is for cross-filesystem operations.
Trying to avoid `fs.utils` as much as possible, but we have some
functions that are really utilities coming, so I am making a place
for them. :)
This commit is contained in:
Saugat Pachhai (सौगात)
2022-05-12 18:02:15 +03:00
committed by Ruslan Kuprieiev
parent 005d56eedf
commit aac2fc0ca0
10 changed files with 19 additions and 19 deletions
+2 -2
View File
@@ -66,7 +66,7 @@ def test_clear_on_download_err(tmp_dir, dvc, index, mocker):
assert list(index.hashes())
mocker.patch("dvc.fs.utils.transfer", side_effect=Exception)
mocker.patch("dvc.fs.generic.transfer", side_effect=Exception)
with pytest.raises(DownloadError):
dvc.pull()
assert not list(index.hashes())
@@ -83,7 +83,7 @@ def test_partial_upload(tmp_dir, dvc, index, mocker):
raise Exception("stop baz")
return original(self, from_file, to_info, name, **kwargs)
mocker.patch("dvc.fs.utils.transfer", unreliable_upload)
mocker.patch("dvc.fs.generic.transfer", unreliable_upload)
with pytest.raises(UploadError):
dvc.push()
assert not list(index.hashes())