MCPcopy
hub / github.com/treeverse/dvc / test_pull_no_00_prefix

Method test_pull_no_00_prefix

dvc/testing/remote_tests.py:148–175  ·  view source on GitHub ↗
(self, tmp_dir, dvc, remote, monkeypatch)

Source from the content-addressed store, hash-verified

146
147 @pytest.mark.xfail(raises=NotImplementedError, strict=False)
148 def test_pull_no_00_prefix(self, tmp_dir, dvc, remote, monkeypatch):
149 # Related: https://github.com/treeverse/dvc/issues/6244
150
151 fs_type = type(dvc.cloud.get_remote_odb("upstream").fs)
152 monkeypatch.setattr(fs_type, "_ALWAYS_TRAVERSE", True, raising=False)
153 monkeypatch.setattr(fs_type, "LIST_OBJECT_PAGE_SIZE", 256, raising=False)
154
155 # foo's md5 checksum is 14ffd92a6cbf5f2f657067df0d5881a6
156 # bar's md5 checksum is 64020400f00960c0ef04052547b134b3
157 foo_out = tmp_dir.dvc_gen("foo", "dvc")[0].outs[0]
158 bar_out = tmp_dir.dvc_gen("bar", "cml")[0].outs[0]
159 expected_hashes = {foo_out.hash_info, bar_out.hash_info}
160
161 dvc.push()
162 status = dvc.cloud.status(expected_hashes)
163 _check_status(status, ok=expected_hashes)
164
165 dvc.cache.local.clear()
166 remove(tmp_dir / "foo")
167 remove(tmp_dir / "bar")
168
169 stats = dvc.pull()
170 assert stats == {
171 "added": ["bar", "foo"],
172 "deleted": [],
173 "modified": [],
174 "stats": {"fetched": 2, "added": 2, "deleted": 0, "modified": 0},
175 }
176
177
178class TestRemoteVersionAware:

Callers

nothing calls this directly

Calls 8

removeFunction · 0.90
_check_statusFunction · 0.85
get_remote_odbMethod · 0.80
dvc_genMethod · 0.80
pushMethod · 0.45
statusMethod · 0.45
clearMethod · 0.45
pullMethod · 0.45

Tested by

no test coverage detected