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:
Mr. Outis
2019-04-25 04:50:44 +03:00
committed by Ruslan Kuprieiev
parent 44e20f1aa8
commit c0104e2e61
7 changed files with 177 additions and 3 deletions
+30
View File
@@ -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)