mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-19 15:28:28 +01:00
+1
-1
@@ -304,7 +304,7 @@ class RemoteLOCAL(RemoteBase):
|
||||
copyfile(path_info['path'], tmp_file, no_progress_bar=no_progress_bar, name=name)
|
||||
except Exception as exc:
|
||||
Logger.error("Failed to download '{}' to '{}'".format(path_info['path'], path), exc)
|
||||
return
|
||||
continue
|
||||
|
||||
os.rename(tmp_file, path)
|
||||
|
||||
|
||||
@@ -37,8 +37,12 @@ class TestCheckout(TestRepro):
|
||||
|
||||
class TestCheckoutSingleStage(TestCheckout):
|
||||
def test(self):
|
||||
self.dvc.checkout(self.foo_stage.path)
|
||||
self.dvc.checkout(self.data_dir_stage.path)
|
||||
ret = main(['checkout', self.foo_stage.path])
|
||||
self.assertEqual(ret, 0)
|
||||
|
||||
ret = main(['checkout', self.data_dir_stage.path])
|
||||
self.assertEqual(ret, 0)
|
||||
|
||||
self._test_checkout()
|
||||
|
||||
|
||||
|
||||
@@ -18,6 +18,10 @@ class TestConfigCLI(TestDvc):
|
||||
|
||||
return True
|
||||
|
||||
def test_root(self):
|
||||
ret = main(['root'])
|
||||
self.assertEqual(ret, 0)
|
||||
|
||||
def test(self):
|
||||
section = 'setsection'
|
||||
field = 'setfield'
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
import os
|
||||
import stat
|
||||
import shutil
|
||||
import filecmp
|
||||
|
||||
from dvc.main import main
|
||||
from dvc.command.imp import CmdImport
|
||||
|
||||
from tests.basic_env import TestDvc
|
||||
|
||||
|
||||
class TestCmdImport(TestDvc):
|
||||
def test(self):
|
||||
ret = main(['import',
|
||||
self.FOO, 'import'])
|
||||
self.assertEqual(ret, 0)
|
||||
|
||||
ret = main(['import',
|
||||
'non-existing-file', 'import'])
|
||||
self.assertNotEqual(ret, 0)
|
||||
@@ -5,11 +5,14 @@ from dvc.main import main
|
||||
from tests.basic_env import TestDvc
|
||||
|
||||
|
||||
class TestInit(TestDvc):
|
||||
class TestInstall(TestDvc):
|
||||
def test(self):
|
||||
ret = main(['install'])
|
||||
self.assertEqual(ret, 0)
|
||||
|
||||
ret = main(['install'])
|
||||
self.assertNotEqual(ret, 0)
|
||||
|
||||
self.assertTrue(os.path.isfile('.git/hooks/post-checkout'))
|
||||
|
||||
self.dvc.add(self.FOO)
|
||||
|
||||
Reference in New Issue
Block a user