outputs: validate that output is not ignored (#4386)

This commit is contained in:
Paweł Redzyński
2020-08-14 14:30:12 +03:00
committed by GitHub
parent 00925029b4
commit 35f125f3df
4 changed files with 35 additions and 5 deletions
+6
View File
@@ -5,6 +5,7 @@ from funcy import first
from voluptuous import MultipleInvalid, Schema
from dvc.cache import NamedCache
from dvc.ignore import _no_match
from dvc.output import CHECKSUM_SCHEMA, BaseOutput
@@ -72,6 +73,11 @@ def test_get_used_cache(exists, expected_message, mocker, caplog):
stage = mocker.MagicMock()
mocker.patch.object(stage, "__str__", return_value="stage: 'stage.dvc'")
mocker.patch.object(stage, "addressing", "stage.dvc")
mocker.patch.object(
stage.repo.tree.dvcignore,
"check_ignore",
return_value=_no_match("path"),
)
output = BaseOutput(stage, "path")