dvc: checkout single file

Fixes #666

Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
Ruslan Kuprieiev
2018-04-24 13:45:30 +03:00
parent d9d7692e8d
commit 52c08b2926
4 changed files with 27 additions and 8 deletions
+8 -1
View File
@@ -16,7 +16,7 @@ class TestCheckout(TestRepro):
def setUp(self):
super(TestCheckout, self).setUp()
self.dvc.add(self.DATA_DIR)
self.data_dir_stage = self.dvc.add(self.DATA_DIR)
self.orig = 'orig'
shutil.copy(self.FOO, self.orig)
@@ -35,6 +35,13 @@ class TestCheckout(TestRepro):
self.assertTrue(filecmp.cmp(self.FOO, self.orig))
class TestCheckoutSingleStage(TestCheckout):
def test(self):
self.dvc.checkout(self.foo_stage.path)
self.dvc.checkout(self.data_dir_stage.path)
self._test_checkout()
class TestCheckoutCorruptedCacheFile(TestRepro):
def test(self):
cache = self.foo_stage.outs[0].cache