mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
Move test to output and use mocker
This commit is contained in:
committed by
Paweł Redzyński
parent
5da72fc8ff
commit
0a3dd7a97f
@@ -1,7 +1,6 @@
|
||||
import logging
|
||||
import os
|
||||
import shutil
|
||||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
from flaky.flaky_decorator import flaky
|
||||
@@ -10,7 +9,6 @@ import dvc as dvc_module
|
||||
from dvc.cli import main
|
||||
from dvc.data.db.local import LocalObjectDB
|
||||
from dvc.external_repo import clean_repos
|
||||
from dvc.fs.base import RemoteMissingDepsError
|
||||
from dvc.objects.db import ObjectDB
|
||||
from dvc.stage.exceptions import StageNotFound
|
||||
from dvc.testing.test_remote import ( # noqa, pylint: disable=unused-import
|
||||
@@ -572,20 +570,3 @@ def test_target_remote(tmp_dir, dvc, make_remote):
|
||||
"6b18131dc289fd37006705affe961ef8.dir",
|
||||
"b8a9f715dbb64fd5c56e7783c6820a61",
|
||||
}
|
||||
|
||||
|
||||
def test_remote_missing_data_dir(tmp_dir, scm, dvc, make_remote):
|
||||
tmp_dir.dvc_gen({"dir": {"subfile": "file2 content"}}, commit="add dir")
|
||||
with dvc.config.edit() as conf:
|
||||
conf["remote"]["s3"] = {"url": "s3://bucket/name"}
|
||||
conf["core"] = {"remote": "s3"}
|
||||
|
||||
remove("dir")
|
||||
remove(dvc.odb.local.cache_dir)
|
||||
|
||||
with patch(
|
||||
"dvc.data_cloud.DataCloud.get_remote_odb",
|
||||
side_effect=RemoteMissingDepsError("remote missing"),
|
||||
):
|
||||
with pytest.raises(RemoteMissingDepsError):
|
||||
dvc.pull()
|
||||
|
||||
Reference in New Issue
Block a user