Skip to content

Commit

Permalink
bench: refactor test_repro
Browse files Browse the repository at this point in the history
  • Loading branch information
dberenbaum committed Dec 14, 2023
1 parent 01bedaa commit d9abbe7
Showing 1 changed file with 5 additions and 22 deletions.
27 changes: 5 additions & 22 deletions dvc/testing/benchmarks/cli/commands/test_repro.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,8 @@
def test_repro(bench_dvc, tmp_dir, dvc, dataset):
dvc.add(dataset)
def test_repro(bench_dvc, tmp_dir, dvc, make_dataset, run_copy):
dataset = make_dataset(dvcfile=True, files=True, cache=True)
source_path = dataset.relative_to(tmp_dir).as_posix()
dvc.stage.add(
name="copy-1",
deps=[source_path],
outs=["copy-1"],
cmd=f"cp -R {source_path} copy-1",
)
dvc.stage.add(
name="copy-2",
deps=[source_path],
outs=["copy-2"],
cmd=f"cp -R {source_path} copy-2",
)
combine_cmds = [
"mkdir combine",
"cp -R copy-1 combine/1",
"cp -R copy-2 combine/2",
]
dvc.stage.add(
name="combine", deps=["copy-1", "copy-2"], outs=["combine"], cmd=combine_cmds
)
run_copy(source_path, "copy-1", name="copy-1")
run_copy(source_path, "copy-2", name="copy-2")
run_copy("copy-1", "copy-3", name="copy-3")
bench_dvc("repro")
bench_dvc("repro", name="noop")

0 comments on commit d9abbe7

Please sign in to comment.