mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-27 07:18:28 +01:00
repro: implement downstream option (#1926)
* repro: implement downstream option Close #1555 * Update scripts/completion/dvc.zsh Co-Authored-By: mroutis <[email protected]> * Update dvc/command/repro.py Co-Authored-By: mroutis <[email protected]>
This commit is contained in:
committed by
Ruslan Kuprieiev
parent
44e20f1aa8
commit
c0104e2e61
@@ -0,0 +1,30 @@
|
||||
from dvc.command.repro import CmdRepro
|
||||
from dvc.cli import parse_args
|
||||
|
||||
default_arguments = {
|
||||
"all_pipelines": False,
|
||||
"downstream": False,
|
||||
"dry": False,
|
||||
"force": False,
|
||||
"ignore_build_cache": False,
|
||||
"interactive": False,
|
||||
"no_commit": False,
|
||||
"pipeline": False,
|
||||
"recursive": True,
|
||||
}
|
||||
|
||||
|
||||
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("Dvcfile", **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("Dvcfile", **arguments)
|
||||
Reference in New Issue
Block a user