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

Function test_pull_partial

tests/func/test_data_cloud.py:563–574  ·  view source on GitHub ↗
(tmp_dir, dvc, local_remote)

Source from the content-addressed store, hash-verified

561
562
563def test_pull_partial(tmp_dir, dvc, local_remote):
564 other_files = {f"spam{i}": f"spam{i}" for i in range(10)}
565 tmp_dir.dvc_gen({"foo": {"bar": {"baz": "baz"}, **other_files}})
566 dvc.push()
567 clean(["foo"], dvc)
568
569 stats = dvc.pull(os.path.join("foo", "bar"))
570 assert stats == empty_pull | {
571 "added": [os.path.join("foo", "")],
572 "stats": empty_stats | {"fetched": 2, "added": 1},
573 }
574 assert (tmp_dir / "foo").read_text() == {"bar": {"baz": "baz"}}
575
576
577def test_output_remote(tmp_dir, dvc, make_remote):

Callers

nothing calls this directly

Calls 6

dvc_genMethod · 0.80
joinMethod · 0.80
cleanFunction · 0.70
pushMethod · 0.45
pullMethod · 0.45
read_textMethod · 0.45

Tested by

no test coverage detected