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

Function test_pull_partial_import

tests/func/test_data_cloud.py:283–295  ·  view source on GitHub ↗
(tmp_dir, dvc, local_workspace)

Source from the content-addressed store, hash-verified

281
282
283def test_pull_partial_import(tmp_dir, dvc, local_workspace):
284 local_workspace.gen("file", "file content")
285 dst = tmp_dir / "file"
286 stage = dvc.imp_url("remote://workspace/file", os.fspath(dst), no_download=True)
287
288 result = dvc.pull("file")
289 assert result == empty_checkout | {
290 "added": ["file"],
291 "stats": empty_stats | {"fetched": 1, "added": 1},
292 }
293 assert dst.exists()
294
295 assert stage.outs[0].get_hash().value == "d10b4c3ff123b26dc068d43a8bef2d23"
296
297
298def test_pull_partial_import_missing(tmp_dir, dvc, local_workspace):

Callers

nothing calls this directly

Calls 5

genMethod · 0.45
fspathMethod · 0.45
pullMethod · 0.45
existsMethod · 0.45
get_hashMethod · 0.45

Tested by

no test coverage detected