| 519 | "key,expected", [("all_tags", 2), ("all_branches", 3), ("all_commits", 3)] |
| 520 | ) |
| 521 | def 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 | |
| 540 | def test_push_pull_fetch_pipeline_stages(tmp_dir, dvc, run_copy, local_remote): |