diff --git a/dvc/remote/local.py b/dvc/remote/local.py index 7a6550881..7ddb6ab95 100644 --- a/dvc/remote/local.py +++ b/dvc/remote/local.py @@ -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) diff --git a/tests/test_checkout.py b/tests/test_checkout.py index 95a0b807b..c24c0fcb4 100644 --- a/tests/test_checkout.py +++ b/tests/test_checkout.py @@ -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() diff --git a/tests/test_config.py b/tests/test_config.py index a13379b5c..d582c354b 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -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' diff --git a/tests/test_import.py b/tests/test_import.py new file mode 100644 index 000000000..f1f3630d2 --- /dev/null +++ b/tests/test_import.py @@ -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) diff --git a/tests/test_install.py b/tests/test_install.py index d235bbb05..28b67095f 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -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)