Update dvc/dependency/base.py

Co-Authored-By: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
Paweł Redzyński
2019-09-14 19:40:59 +02:00
committed by pawel
co-authored by Ruslan Kuprieiev
parent 74a0cef3e5
commit 53f6aead95
2 changed files with 3 additions and 7 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ class DependencyIsNotFileOrDirError(DvcException):
class DependencyIsStageFileError(DvcException):
def __init__(self, path):
super(DependencyIsStageFileError, self).__init__(
"Stage file '{}' cannot be dependency.".format(path)
"Stage file '{}' cannot be a dependency.".format(path)
)
+2 -6
View File
@@ -946,22 +946,18 @@ def test_bad_stage_fname(repo_dir, dvc_repo):
def test_should_raise_on_stage_dependency(repo_dir, dvc_repo):
stage_file_name = "name.dvc"
with pytest.raises(DependencyIsStageFileError):
dvc_repo.run(
cmd="python {} {} {}".format(repo_dir.CODE, repo_dir.FOO, "out"),
deps=[repo_dir.FOO, stage_file_name],
deps=[repo_dir.FOO, "name.dvc"],
outs=["out"],
)
def test_should_raise_on_stage_output(repo_dir, dvc_repo):
stage_file_name = "name.dvc"
with pytest.raises(OutputIsStageFileError):
dvc_repo.run(
cmd="python {} {} {}".format(repo_dir.CODE, repo_dir.FOO, "out"),
deps=[repo_dir.FOO],
outs=[stage_file_name],
outs=["name.dvc"],
)