mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
bench: git-ignore dataset fixture used for data status (#10793)
This commit is contained in:
@@ -4,12 +4,15 @@ from shutil import rmtree
|
||||
def test_data_status(bench_dvc, tmp_dir, scm, dvc, make_dataset):
|
||||
args = ("data", "status")
|
||||
dataset = make_dataset(cache=True, files=True, dvcfile=True, commit=False)
|
||||
scm.ignore(dataset)
|
||||
rmtree(dvc.tmp_dir)
|
||||
|
||||
bench_dvc(*args, name="new")
|
||||
bench_dvc(*args, name="noop")
|
||||
|
||||
tmp_dir.scm_add(dataset.with_suffix(".dvc").name, commit="add dataset")
|
||||
tmp_dir.scm_add(
|
||||
[dataset.with_suffix(".dvc").name, ".gitignore"], commit="add dataset"
|
||||
)
|
||||
|
||||
(dataset / "new").write_text("new")
|
||||
bench_dvc(*args, name="changed")
|
||||
@@ -26,12 +29,15 @@ def test_data_status_all_flags(bench_dvc, tmp_dir, scm, dvc, make_dataset):
|
||||
"--json",
|
||||
)
|
||||
dataset = make_dataset(cache=True, files=True, dvcfile=True, commit=False)
|
||||
scm.ignore(dataset)
|
||||
rmtree(dvc.tmp_dir)
|
||||
|
||||
bench_dvc(*args, name="new")
|
||||
bench_dvc(*args, name="noop")
|
||||
|
||||
tmp_dir.scm_add(dataset.with_suffix(".dvc").name, commit="add dataset")
|
||||
tmp_dir.scm_add(
|
||||
[dataset.with_suffix(".dvc").name, ".gitignore"], commit="add dataset"
|
||||
)
|
||||
|
||||
(dataset / "new").write_text("new")
|
||||
bench_dvc(*args, name="changed")
|
||||
|
||||
Reference in New Issue
Block a user