mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-27 23:09:28 +01:00
dvc.fs: move fs to dvc.objects.fs
Some of the APIs/FileSystems are reimported inside dvc.fs module.
This commit is contained in:
committed by
Ruslan Kuprieiev
parent
b8e770747f
commit
570e3a5359
@@ -2,7 +2,7 @@ import pytest
|
||||
|
||||
from dvc.data.db import get_index
|
||||
from dvc.exceptions import DownloadError, UploadError
|
||||
from dvc.fs.local import LocalFileSystem
|
||||
from dvc.fs import LocalFileSystem
|
||||
from dvc.utils.fs import remove
|
||||
from tests.utils import clean_staging
|
||||
|
||||
@@ -66,7 +66,7 @@ def test_clear_on_download_err(tmp_dir, dvc, index, mocker):
|
||||
|
||||
assert list(index.hashes())
|
||||
|
||||
mocker.patch("dvc.fs.generic.transfer", side_effect=Exception)
|
||||
mocker.patch("dvc.objects.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.generic.transfer", unreliable_upload)
|
||||
mocker.patch("dvc.objects.fs.generic.transfer", unreliable_upload)
|
||||
with pytest.raises(UploadError):
|
||||
dvc.push()
|
||||
assert not list(index.hashes())
|
||||
|
||||
Reference in New Issue
Block a user