mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
cli: remove dvc run (#9508)
Note that `Repo.run()` API still exists, which will be removed in successive PRs. A lot of tests depend on it that it'll take time before removing it.
This commit is contained in:
@@ -11,7 +11,6 @@ from dvc.commands.data_sync import CmdDataPull, CmdDataPush
|
||||
from dvc.commands.init import CmdInit
|
||||
from dvc.commands.remove import CmdRemove
|
||||
from dvc.commands.repro import CmdRepro
|
||||
from dvc.commands.run import CmdRun
|
||||
from dvc.commands.status import CmdDataStatus
|
||||
from dvc.exceptions import NotDvcRepoError
|
||||
|
||||
@@ -21,54 +20,6 @@ def test_argparse(dvc):
|
||||
assert isinstance(args.func(args), CmdInit)
|
||||
|
||||
|
||||
def test_run(dvc):
|
||||
dep1 = "dep1"
|
||||
dep2 = "dep2"
|
||||
|
||||
out1 = "out1"
|
||||
out2 = "out2"
|
||||
|
||||
out_no_cache1 = "out_no_cache1"
|
||||
out_no_cache2 = "out_no_cache2"
|
||||
|
||||
fname = "dvc.dvc"
|
||||
cmd = "cmd"
|
||||
arg1 = "arg1"
|
||||
arg2 = "arg2"
|
||||
|
||||
args = parse_args(
|
||||
[
|
||||
"run",
|
||||
"-d",
|
||||
dep1,
|
||||
"--deps",
|
||||
dep2,
|
||||
"-o",
|
||||
out1,
|
||||
"--outs",
|
||||
out2,
|
||||
"-O",
|
||||
out_no_cache1,
|
||||
"--outs-no-cache",
|
||||
out_no_cache2,
|
||||
"--file",
|
||||
fname,
|
||||
cmd,
|
||||
arg1,
|
||||
arg2,
|
||||
]
|
||||
)
|
||||
cmd_cls = args.func(args)
|
||||
assert isinstance(cmd_cls, CmdRun)
|
||||
assert args.deps == [dep1, dep2]
|
||||
assert args.outs == [out1, out2]
|
||||
assert args.outs_no_cache == [out_no_cache1, out_no_cache2]
|
||||
assert args.file == fname
|
||||
assert args.command == [cmd, arg1, arg2]
|
||||
|
||||
cmd_cls.repo.close()
|
||||
|
||||
|
||||
def test_pull(dvc):
|
||||
args = parse_args(["pull"])
|
||||
cmd = args.func(args)
|
||||
|
||||
Reference in New Issue
Block a user