mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-10 23:10:42 +01:00
dvc: rename plot to plots (#3802)
* dvc: rename plot to plots Follows `dvc params/metrics` convention and is needed in preparation for new commands and some refactoring. Part of #3409 * completion: rename plot -> plots
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import pytest
|
||||
|
||||
from dvc.cli import parse_args
|
||||
from dvc.command.plot import CmdPlotDiff, CmdPlotShow
|
||||
from dvc.command.plots import CmdPlotsDiff, CmdPlotsShow
|
||||
|
||||
|
||||
def test_metrics_diff(mocker):
|
||||
cli_args = parse_args(
|
||||
[
|
||||
"plot",
|
||||
"plots",
|
||||
"diff",
|
||||
"--file",
|
||||
"result.extension",
|
||||
@@ -34,7 +34,7 @@ def test_metrics_diff(mocker):
|
||||
"tag2",
|
||||
]
|
||||
)
|
||||
assert cli_args.func == CmdPlotDiff
|
||||
assert cli_args.func == CmdPlotsDiff
|
||||
|
||||
cmd = cli_args.func(cli_args)
|
||||
|
||||
@@ -63,7 +63,7 @@ def test_metrics_diff(mocker):
|
||||
def test_metrics_show(mocker):
|
||||
cli_args = parse_args(
|
||||
[
|
||||
"plot",
|
||||
"plots",
|
||||
"show",
|
||||
"-f",
|
||||
"result.extension",
|
||||
@@ -77,7 +77,7 @@ def test_metrics_show(mocker):
|
||||
"datafile",
|
||||
]
|
||||
)
|
||||
assert cli_args.func == CmdPlotShow
|
||||
assert cli_args.func == CmdPlotsShow
|
||||
|
||||
cmd = cli_args.func(cli_args)
|
||||
|
||||
@@ -115,7 +115,7 @@ def test_metrics_show(mocker):
|
||||
def test_revisions(mocker, arg_revisions, is_dirty, expected_revisions):
|
||||
args = mocker.MagicMock()
|
||||
|
||||
cmd = CmdPlotDiff(args)
|
||||
cmd = CmdPlotsDiff(args)
|
||||
mocker.patch.object(args, "revisions", arg_revisions)
|
||||
mocker.patch.object(cmd.repo.scm, "is_dirty", return_value=is_dirty)
|
||||
|
||||
Reference in New Issue
Block a user