run: try to save deps before running the command (#3709)

Unlike old `_check_missing_deps`, this also verifies that we are able to
save more complex dependencies such as parameters, where we not only
care about the config file, but also about the parameters in it.

Fixes #3707
This commit is contained in:
Ruslan Kuprieiev
2020-04-30 17:16:16 +03:00
committed by GitHub
parent d998c0a536
commit 71d156ac49
3 changed files with 9 additions and 23 deletions
+3 -2
View File
@@ -26,7 +26,6 @@ from dvc.stage.exceptions import (
StagePathOutsideError,
StagePathNotFoundError,
StagePathNotDirectoryError,
MissingDep,
)
from dvc.system import System
from dvc.utils import file_md5
@@ -79,7 +78,9 @@ class TestRunEmpty(TestDvc):
class TestRunMissingDep(TestDvc):
def test(self):
with self.assertRaises(MissingDep):
from dvc.dependency.base import DependencyDoesNotExistError
with self.assertRaises(DependencyDoesNotExistError):
self.dvc.run(
cmd="",
deps=["non-existing-dep"],