mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-10 15:28:34 +01:00
From discussion on discord https://discordapp.com/channels/485586884165107732/485596304961962003/548083580052701205 Signed-off-by: Ruslan Kuprieiev <[email protected]>
22 lines
536 B
Python
22 lines
536 B
Python
import mock
|
|
|
|
from dvc.stage import Stage
|
|
from dvc.output import OutputLOCAL
|
|
|
|
from tests.basic_env import TestDvc
|
|
|
|
|
|
class TestOutputLOCAL(TestDvc):
|
|
def _get_cls(self):
|
|
return OutputLOCAL
|
|
|
|
def _get_output(self):
|
|
stage = Stage(self.dvc)
|
|
return self._get_cls()(stage, "path", cache=False)
|
|
|
|
def test_save_missing(self):
|
|
o = self._get_output()
|
|
with mock.patch.object(o.remote, "exists", return_value=False):
|
|
with self.assertRaises(o.DoesNotExistError):
|
|
o.save()
|