mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-10 07:18:27 +01:00
+1
-1
@@ -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
|
||||
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user