mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
exp: add exp remove command (#5443)
* exp: add remove function for removing specific experiment(s) * add `dvc exp remove` command * update tests
This commit is contained in:
@@ -9,6 +9,7 @@ from dvc.command.experiments import (
|
||||
CmdExperimentsList,
|
||||
CmdExperimentsPull,
|
||||
CmdExperimentsPush,
|
||||
CmdExperimentsRemove,
|
||||
CmdExperimentsRun,
|
||||
CmdExperimentsShow,
|
||||
)
|
||||
@@ -240,3 +241,17 @@ def test_experiments_pull(dvc, scm, mocker):
|
||||
jobs=1,
|
||||
run_cache=True,
|
||||
)
|
||||
|
||||
|
||||
def test_experiments_remove(dvc, scm, mocker):
|
||||
cli_args = parse_args(["experiments", "remove", "--queue"])
|
||||
assert cli_args.func == CmdExperimentsRemove
|
||||
|
||||
cmd = cli_args.func(cli_args)
|
||||
m = mocker.patch("dvc.repo.experiments.remove.remove", return_value={})
|
||||
|
||||
assert cmd.run() == 0
|
||||
|
||||
m.assert_called_once_with(
|
||||
cmd.repo, exp_names=[], queue=True,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user