diff --git a/dvc/dependency/base.py b/dvc/dependency/base.py index 3fba3960d..4f52bf5d0 100644 --- a/dvc/dependency/base.py +++ b/dvc/dependency/base.py @@ -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) ) diff --git a/tests/func/test_run.py b/tests/func/test_run.py index d4abed894..148bb8853 100644 --- a/tests/func/test_run.py +++ b/tests/func/test_run.py @@ -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"], )