dvc: upgrade to dvc-objects 0.0.4

This commit is contained in:
Ruslan Kuprieiev
2022-06-13 18:03:53 +05:45
committed by skshetry
parent 7b16a377e5
commit ef689c5593
20 changed files with 110 additions and 313 deletions
+5 -5
View File
@@ -36,8 +36,8 @@ def test_cache(tmp_dir, dvc):
assert cache1_md5 in md5_list
assert cache2_md5 in md5_list
odb_cache1 = odb.local.hash_to_path(cache1_md5)
odb_cache2 = odb.local.hash_to_path(cache2_md5)
odb_cache1 = odb.local.oid_to_path(cache1_md5)
odb_cache2 = odb.local.oid_to_path(cache2_md5)
assert os.fspath(odb_cache1) == cache1
assert os.fspath(odb_cache2) == cache2
@@ -46,13 +46,13 @@ def test_cache_load_bad_dir_cache(tmp_dir, dvc):
from dvc_data import load
dir_hash = "123.dir"
fname = os.fspath(dvc.odb.local.hash_to_path(dir_hash))
fname = os.fspath(dvc.odb.local.oid_to_path(dir_hash))
tmp_dir.gen({fname: "<clearly>not,json"})
with pytest.raises(ObjectFormatError):
load(dvc.odb.local, HashInfo("md5", dir_hash))
dir_hash = "234.dir"
fname = os.fspath(dvc.odb.local.hash_to_path(dir_hash))
fname = os.fspath(dvc.odb.local.oid_to_path(dir_hash))
tmp_dir.gen({fname: '{"a": "b"}'})
with pytest.raises(ObjectFormatError):
load(dvc.odb.local, HashInfo("md5", dir_hash))
@@ -89,7 +89,7 @@ def test_remote_cache_references(tmp_dir, dvc):
dvc.odb = ODBManager(dvc)
assert dvc.odb.ssh.fs_path == "/tmp"
assert dvc.odb.ssh.path == "/tmp"
def test_shared_cache_dir(tmp_dir):