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

Function test_checkout

tests/unit/command/test_checkout.py:5–20  ·  view source on GitHub ↗
(tmp_dir, dvc, mocker)

Source from the content-addressed store, hash-verified

3
4
5def test_checkout(tmp_dir, dvc, mocker):
6 cli_args = parse_args(["checkout", "foo.dvc", "bar.dvc", "--relink", "--with-deps"])
7 assert cli_args.func == CmdCheckout
8
9 cmd = cli_args.func(cli_args)
10 m = mocker.patch("dvc.repo.Repo.checkout")
11
12 assert cmd.run() == 0
13 m.assert_called_once_with(
14 targets=["foo.dvc", "bar.dvc"],
15 force=False,
16 recursive=False,
17 relink=True,
18 with_deps=True,
19 allow_missing=False,
20 )
21
22
23def test_log_changes(capsys):

Callers

nothing calls this directly

Calls 3

parse_argsFunction · 0.90
funcMethod · 0.80
runMethod · 0.45

Tested by

no test coverage detected