mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-04 23:09:44 +01:00
Outputs and dependencies don't really care about the remotes, as they don't do any pushing or pulling. What they really need are the trees, so let's use them directly. Part of #4050
21 lines
544 B
Python
21 lines
544 B
Python
import mock
|
|
|
|
from dvc.dependency import LocalDependency
|
|
from dvc.stage import Stage
|
|
from tests.basic_env import TestDvc
|
|
|
|
|
|
class TestLocalDependency(TestDvc):
|
|
def _get_cls(self):
|
|
return LocalDependency
|
|
|
|
def _get_dependency(self):
|
|
stage = Stage(self.dvc)
|
|
return self._get_cls()(stage, "path")
|
|
|
|
def test_save_missing(self):
|
|
d = self._get_dependency()
|
|
with mock.patch.object(d.tree, "exists", return_value=False):
|
|
with self.assertRaises(d.DoesNotExistError):
|
|
d.save()
|