get, get-url: add --jobs option (#5362)

This commit is contained in:
Batuhan Taskaya
2021-02-02 15:49:58 +02:00
committed by GitHub
parent 31e4a3325d
commit a92bfd272d
6 changed files with 46 additions and 9 deletions
+14 -2
View File
@@ -4,7 +4,17 @@ from dvc.command.get import CmdGet
def test_get(mocker):
cli_args = parse_args(
["get", "repo_url", "src", "--out", "out", "--rev", "version"]
[
"get",
"repo_url",
"src",
"--out",
"out",
"--rev",
"version",
"--jobs",
"4",
]
)
assert cli_args.func == CmdGet
@@ -13,7 +23,9 @@ def test_get(mocker):
assert cmd.run() == 0
m.assert_called_once_with("repo_url", path="src", out="out", rev="version")
m.assert_called_once_with(
"repo_url", path="src", out="out", rev="version", jobs=4
)
def test_get_url(mocker, caplog):
+2 -2
View File
@@ -3,7 +3,7 @@ from dvc.command.get_url import CmdGetUrl
def test_get_url(mocker):
cli_args = parse_args(["get-url", "src", "out"])
cli_args = parse_args(["get-url", "src", "out", "-j", "5"])
assert cli_args.func == CmdGetUrl
cmd = cli_args.func(cli_args)
@@ -11,4 +11,4 @@ def test_get_url(mocker):
assert cmd.run() == 0
m.assert_called_once_with("src", out="out")
m.assert_called_once_with("src", out="out", jobs=5)