mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-26 15:28:28 +01:00
checkout: raise on non existing dir cache (#2514)
* checkout: raise on non existing dir cache * checkout: don't throw on failed load_dir_cache * checkout: raise on failed checkouts, only after all checkouts are perfromed * remote: base: raise on failed dir cache loading * rename exception for failed checkout
This commit is contained in:
committed by
Ruslan Kuprieiev
parent
7409fadb84
commit
be012e70cf
@@ -6,6 +6,7 @@ import configobj
|
||||
|
||||
from dvc.cache import Cache
|
||||
from dvc.main import main
|
||||
from dvc.remote.base import DirCacheError
|
||||
from dvc.utils import relpath
|
||||
|
||||
from tests.basic_env import TestDvc, TestDir
|
||||
@@ -49,7 +50,8 @@ class TestCacheLoadBadDirCache(TestDvc):
|
||||
checksum = "123.dir"
|
||||
fname = self.dvc.cache.local.get(checksum)
|
||||
self.create(fname, "<clearly>not,json")
|
||||
self._do_test(self.dvc.cache.local.load_dir_cache(checksum))
|
||||
with pytest.raises(DirCacheError):
|
||||
self.dvc.cache.local.load_dir_cache(checksum)
|
||||
|
||||
checksum = "234.dir"
|
||||
fname = self.dvc.cache.local.get(checksum)
|
||||
|
||||
Reference in New Issue
Block a user