mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-07 23:09:21 +01:00
Note: This does not change default for `pipeline` as it cannot show multiple DAGs at the same time. If we are able to show multiple DAGs, we can just default to `dvc.yaml`.
33 lines
913 B
Python
33 lines
913 B
Python
from dvc.cli import parse_args
|
|
from dvc.command.repro import CmdRepro
|
|
from dvc.dvcfile import PIPELINE_FILE
|
|
|
|
default_arguments = {
|
|
"all_pipelines": False,
|
|
"downstream": False,
|
|
"dry": False,
|
|
"force": False,
|
|
"ignore_build_cache": False,
|
|
"interactive": False,
|
|
"no_commit": False,
|
|
"pipeline": False,
|
|
"single_item": False,
|
|
"recursive": False,
|
|
}
|
|
|
|
|
|
def test_default_arguments(dvc, mocker):
|
|
cmd = CmdRepro(parse_args(["repro"]))
|
|
mocker.patch.object(cmd.repo, "reproduce")
|
|
cmd.run()
|
|
cmd.repo.reproduce.assert_called_with(PIPELINE_FILE, **default_arguments)
|
|
|
|
|
|
def test_downstream(dvc, mocker):
|
|
cmd = CmdRepro(parse_args(["repro", "--downstream"]))
|
|
mocker.patch.object(cmd.repo, "reproduce")
|
|
cmd.run()
|
|
arguments = default_arguments.copy()
|
|
arguments.update({"downstream": True})
|
|
cmd.repo.reproduce.assert_called_with(PIPELINE_FILE, **arguments)
|