mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-12-02 07:18:29 +01:00
Update dvc/dependency/base.py
Co-Authored-By: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
committed by
pawel
co-authored by
Ruslan Kuprieiev
parent
74a0cef3e5
commit
53f6aead95
@@ -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)
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -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"],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user