exit with 1 if targets were not found

This commit is contained in:
Mr. Outis
2019-08-06 21:10:48 -05:00
parent 21a2d3c6ff
commit d4ef110794
4 changed files with 26 additions and 19 deletions
+5 -5
View File
@@ -7,7 +7,7 @@ import logging
from dvc.repo import Repo as DvcRepo
from dvc.main import main
from dvc.exceptions import DvcException, BadMetricError, NoMetricsError
from dvc.exceptions import DvcException, NoMetricsError
from dvc.repo.metrics.show import NO_METRICS_FILE_AT_REFERENCE_WARNING
from dvc.stage import Stage
from dvc.utils import relpath
@@ -412,10 +412,10 @@ class TestMetricsRecursive(TestDvcGit):
self.dvc.scm.checkout("master")
def test(self):
with self.assertRaises(BadMetricError):
self.dvc.metrics.show(
["nested"], all_branches=True, recursive=False
)
ret = self.dvc.metrics.show(
["nested"], all_branches=True, recursive=False
)
self.assertEqual(len(ret), 0)
ret = self.dvc.metrics.show(
["nested"], all_branches=True, recursive=True