From 75083cc472e0812a558819b2a7f4b220c67b691f Mon Sep 17 00:00:00 2001 From: skshetry <18718008+skshetry@users.noreply.github.com> Date: Fri, 27 Jun 2025 21:27:40 +0545 Subject: [PATCH] bench: git-ignore dataset fixture used for data status (#10793) --- .../benchmarks/cli/commands/test_data_status.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dvc/testing/benchmarks/cli/commands/test_data_status.py b/dvc/testing/benchmarks/cli/commands/test_data_status.py index d2c73561e..9e2f0f152 100644 --- a/dvc/testing/benchmarks/cli/commands/test_data_status.py +++ b/dvc/testing/benchmarks/cli/commands/test_data_status.py @@ -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")