mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-19 23:11:44 +01:00
update test fixture to use matchers from dvc.testing (#10940)
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
from dvc.cli import parse_args
|
||||
from dvc.commands.get_url import CmdGetUrl
|
||||
from dvc.config import Config
|
||||
from dvc.testing import matchers as M
|
||||
|
||||
|
||||
def test_get_url(mocker, M):
|
||||
def test_get_url(mocker):
|
||||
cli_args = parse_args(["get-url", "src", "out", "-j", "5"])
|
||||
assert cli_args.func == CmdGetUrl
|
||||
|
||||
|
||||
@@ -2,9 +2,10 @@ from dvc.cli import parse_args
|
||||
from dvc.commands.ls_url import CmdListUrl
|
||||
from dvc.config import Config
|
||||
from dvc.fs import LocalFileSystem
|
||||
from dvc.testing import matchers as M
|
||||
|
||||
|
||||
def test_ls_url(mocker, M):
|
||||
def test_ls_url(mocker):
|
||||
cli_args = parse_args(["ls-url", "src"])
|
||||
assert cli_args.func == CmdListUrl
|
||||
cmd = cli_args.func(cli_args)
|
||||
@@ -21,7 +22,7 @@ def test_ls_url(mocker, M):
|
||||
)
|
||||
|
||||
|
||||
def test_recursive(mocker, M):
|
||||
def test_recursive(mocker):
|
||||
cli_args = parse_args(["ls-url", "-R", "-L", "2", "src"])
|
||||
assert cli_args.func == CmdListUrl
|
||||
cmd = cli_args.func(cli_args)
|
||||
@@ -34,7 +35,7 @@ def test_recursive(mocker, M):
|
||||
)
|
||||
|
||||
|
||||
def test_tree(mocker, M):
|
||||
def test_tree(mocker):
|
||||
cli_args = parse_args(["ls-url", "--tree", "--level", "2", "src"])
|
||||
assert cli_args.func == CmdListUrl
|
||||
cmd = cli_args.func(cli_args)
|
||||
|
||||
@@ -4,6 +4,7 @@ from funcy import set_in
|
||||
from dvc.render import FIELD, FILENAME, REVISION
|
||||
from dvc.render.converter.vega import VegaConverter
|
||||
from dvc.render.match import PlotsData, _squash_plots_properties, match_defs_renderers
|
||||
from dvc.testing import matchers as M
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@@ -118,7 +119,7 @@ def test_group_definitions(data, expected):
|
||||
assert grouped == expected
|
||||
|
||||
|
||||
def test_match_renderers(M):
|
||||
def test_match_renderers():
|
||||
data = {
|
||||
"v1": {
|
||||
"definitions": {
|
||||
@@ -187,7 +188,7 @@ def test_match_renderers(M):
|
||||
assert not renderer_with_errors.definition_errors
|
||||
|
||||
|
||||
def test_flat_datapoints_errors_are_caught(M, mocker):
|
||||
def test_flat_datapoints_errors_are_caught(mocker):
|
||||
d = {}
|
||||
d = set_in(
|
||||
d,
|
||||
|
||||
@@ -4,6 +4,7 @@ from networkx import DiGraph
|
||||
from networkx.utils import graphs_equal
|
||||
|
||||
from dvc.repo.reproduce import get_active_graph, plan_repro
|
||||
from dvc.testing import matchers as M
|
||||
|
||||
|
||||
def test_active_graph(mocker):
|
||||
@@ -26,7 +27,7 @@ def test_active_graph(mocker):
|
||||
assert not graphs_equal(g, active)
|
||||
|
||||
|
||||
def test_repro_plan(M):
|
||||
def test_repro_plan():
|
||||
r"""
|
||||
1
|
||||
/ \
|
||||
|
||||
Reference in New Issue
Block a user