test: add modified dir test

Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
Ruslan Kuprieiev
2018-02-03 14:46:13 +02:00
parent 39f1ba8c58
commit 14ae7811c1
+9
View File
@@ -1,4 +1,5 @@
import os
import stat
import shutil
import filecmp
from checksumdir import dirhash
@@ -70,6 +71,14 @@ class TestAddDirWithExistingCache(TestDvc):
self.dvc.add(dname)
class TestAddModifiedDir(TestDvc):
def test(self):
self.dvc.add(self.DATA_DIR)
os.chmod(self.DATA, stat.S_IWRITE)
os.unlink(self.DATA)
self.dvc.add(self.DATA_DIR)
class TestCmdAdd(TestDvc):
def test(self):
ret = main(['add',