Merge pull request #1014 from efiop/master

test: improve test coverage
This commit is contained in:
Ruslan Kuprieiev
2018-08-14 02:41:19 +03:00
committed by GitHub
2 changed files with 10 additions and 1 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ except NameError:
pass
def prompt(msg, default=False):
def prompt(msg, default=False): # pragma: no cover
if not sys.stdout.isatty():
return default
+9
View File
@@ -5,6 +5,7 @@ from dvc.main import main
from dvc.utils import file_md5
from dvc.stage import Stage
from dvc.command.run import CmdRun
from dvc.exceptions import OutputDuplicationError
from tests.basic_env import TestDvc
@@ -35,6 +36,14 @@ class TestRun(TestDvc):
self.assertEqual(stage.outs[0].md5, file_md5(self.FOO)[0])
self.assertTrue(stage.path, fname)
with self.assertRaises(OutputDuplicationError):
stage = self.dvc.run(cmd=cmd,
deps=deps,
outs=outs,
outs_no_cache=outs_no_cache,
fname='duplicate' + fname,
cwd=cwd)
class TestRunEmpty(TestDvc):
def test(self):