mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-19 07:18:27 +01:00
update test fixture to use matchers from dvc.testing (#10940)
This commit is contained in:
@@ -2,6 +2,7 @@ from os.path import join
|
||||
|
||||
import pytest
|
||||
|
||||
from dvc.testing import matchers as M
|
||||
from dvc.utils import relpath
|
||||
|
||||
|
||||
@@ -54,7 +55,7 @@ def test_diff_new(tmp_dir, scm, dvc):
|
||||
}
|
||||
|
||||
|
||||
def test_diff_deleted(M, tmp_dir, scm, dvc):
|
||||
def test_diff_deleted(tmp_dir, scm, dvc):
|
||||
tmp_dir.gen("params.yaml", "foo: bar")
|
||||
dvc.run(cmd="echo params.yaml", params=["foo"], name="echo-params")
|
||||
scm.add(["params.yaml", "Dvcfile"])
|
||||
|
||||
@@ -6,6 +6,7 @@ import pytest
|
||||
from dvc.dvcfile import PROJECT_FILE
|
||||
from dvc.repo import Repo
|
||||
from dvc.repo.metrics.show import FileResult, Result
|
||||
from dvc.testing import matchers as M
|
||||
from dvc_data.index import DataIndexDirError
|
||||
|
||||
|
||||
@@ -197,7 +198,7 @@ def test_top_level_parametrized(tmp_dir, dvc):
|
||||
}
|
||||
|
||||
|
||||
def test_param_in_a_tracked_directory_with_missing_dir_file(M, tmp_dir, dvc):
|
||||
def test_param_in_a_tracked_directory_with_missing_dir_file(tmp_dir, dvc):
|
||||
tmp_dir.dvc_gen({"dir": {"file": "2"}})
|
||||
(tmp_dir / "dvc.yaml").dump({"params": [join("dir", "file")]})
|
||||
shutil.rmtree(tmp_dir / "dir") # remove from workspace
|
||||
|
||||
Reference in New Issue
Block a user