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

Function test_checkout_recursive

tests/func/test_checkout.py:632–643  ·  view source on GitHub ↗
(tmp_dir, dvc)

Source from the content-addressed store, hash-verified

630
631
632def test_checkout_recursive(tmp_dir, dvc):
633 tmp_dir.gen({"dir": {"foo": "foo", "bar": "bar"}})
634 dvc.add("dir/*", glob=True)
635
636 (tmp_dir / "dir" / "foo").unlink()
637 (tmp_dir / "dir" / "bar").unlink()
638
639 stats = dvc.checkout(["dir"], recursive=True)
640 assert stats == empty_checkout | {
641 "added": [os.path.join("dir", "bar"), os.path.join("dir", "foo")],
642 "stats": empty_stats | {"added": 2},
643 }
644
645
646def test_checkouts_with_different_addressing(tmp_dir, dvc, run_copy):

Callers

nothing calls this directly

Calls 5

unlinkMethod · 0.80
joinMethod · 0.80
genMethod · 0.45
addMethod · 0.45
checkoutMethod · 0.45

Tested by

no test coverage detected