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

Function test_import_no_exec

tests/unit/command/test_imp.py:48–79  ·  view source on GitHub ↗
(mocker, dvc)

Source from the content-addressed store, hash-verified

46
47
48def test_import_no_exec(mocker, dvc):
49 cli_args = parse_args(
50 [
51 "import",
52 "repo_url",
53 "src",
54 "--out",
55 "out",
56 "--rev",
57 "version",
58 "--no-exec",
59 ]
60 )
61
62 cmd = cli_args.func(cli_args)
63 m = mocker.patch.object(cmd.repo, "imp", autospec=True)
64
65 assert cmd.run() == 0
66
67 m.assert_called_once_with(
68 "repo_url",
69 path="src",
70 out="out",
71 rev="version",
72 no_exec=True,
73 no_download=False,
74 jobs=None,
75 config=None,
76 remote=None,
77 remote_config=None,
78 force=False,
79 )
80
81
82def test_import_no_download(mocker, dvc):

Callers

nothing calls this directly

Calls 3

parse_argsFunction · 0.90
funcMethod · 0.80
runMethod · 0.45

Tested by

no test coverage detected