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

Function test_push_pull_all

tests/func/test_data_cloud.py:521–537  ·  view source on GitHub ↗
(tmp_dir, scm, dvc, local_remote, key, expected)

Source from the content-addressed store, hash-verified

519 "key,expected", [("all_tags", 2), ("all_branches", 3), ("all_commits", 3)]
520)
521def test_push_pull_all(tmp_dir, scm, dvc, local_remote, key, expected):
522 tmp_dir.dvc_gen({"foo": "foo"}, commit="first")
523 scm.tag("v1")
524 dvc.remove("foo.dvc")
525 tmp_dir.dvc_gen({"bar": "bar"}, commit="second")
526 scm.tag("v2")
527 with tmp_dir.branch("branch", new=True):
528 dvc.remove("bar.dvc")
529 tmp_dir.dvc_gen({"baz": "baz"}, commit="branch")
530
531 assert dvc.push(**{key: True}) == expected
532
533 clean(["foo", "bar", "baz"], dvc)
534 assert dvc.pull(**{key: True}) == empty_pull | {
535 "added": ["bar", "foo"],
536 "stats": empty_stats | {"fetched": expected, "added": 2},
537 }
538
539
540def test_push_pull_fetch_pipeline_stages(tmp_dir, dvc, run_copy, local_remote):

Callers

nothing calls this directly

Calls 6

dvc_genMethod · 0.80
cleanFunction · 0.70
removeMethod · 0.45
branchMethod · 0.45
pushMethod · 0.45
pullMethod · 0.45

Tested by

no test coverage detected