mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-11 15:28:27 +01:00
stage: check that deps exist before running the command
Fixes #1101 Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
+12
-1
@@ -3,7 +3,7 @@ import filecmp
|
||||
|
||||
from dvc.main import main
|
||||
from dvc.utils import file_md5
|
||||
from dvc.stage import Stage, StageFileBadNameError
|
||||
from dvc.stage import Stage, StageFileBadNameError, MissingDep
|
||||
from dvc.command.run import CmdRun
|
||||
from dvc.exceptions import OutputDuplicationError
|
||||
|
||||
@@ -55,6 +55,17 @@ class TestRunEmpty(TestDvc):
|
||||
cwd=os.curdir)
|
||||
|
||||
|
||||
class TestRunMissingDep(TestDvc):
|
||||
def test(self):
|
||||
with self.assertRaises(MissingDep):
|
||||
self.dvc.run(cmd='',
|
||||
deps=['non-existing-dep'],
|
||||
outs=[],
|
||||
outs_no_cache=[],
|
||||
fname='empty.dvc',
|
||||
cwd=os.curdir)
|
||||
|
||||
|
||||
class TestRunBadStageFilename(TestDvc):
|
||||
def test(self):
|
||||
with self.assertRaises(StageFileBadNameError):
|
||||
|
||||
Reference in New Issue
Block a user