mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
benchmarks: use bench_dvc for commands that generate dvcfiles
This commit is contained in:
committed by
Peter Rowlands (변기호)
parent
21458796ed
commit
fa14507bc8
@@ -3,7 +3,7 @@ def test_update(bench_dvc, tmp_dir, dvc, make_dataset):
|
|||||||
dataset = make_dataset(
|
dataset = make_dataset(
|
||||||
cache=False, files=True, dvcfile=False, commit=False, remote=False
|
cache=False, files=True, dvcfile=False, commit=False, remote=False
|
||||||
)
|
)
|
||||||
dvc.imp_url(str(dataset), "new")
|
bench_dvc("import-url", str(dataset), "new")
|
||||||
(dataset / "new").write_text("new")
|
(dataset / "new").write_text("new")
|
||||||
bench_dvc("update", "new.dvc")
|
bench_dvc("update", "new.dvc")
|
||||||
bench_dvc("update", "new.dvc", name="noop")
|
bench_dvc("update", "new.dvc", name="noop")
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ def test_partial_add(bench_dvc, tmp_dir, dvc, dataset, remote):
|
|||||||
shutil.move(dataset / f, tmp_dir / "partial-copy" / f)
|
shutil.move(dataset / f, tmp_dir / "partial-copy" / f)
|
||||||
|
|
||||||
# Add/push partial dataset
|
# Add/push partial dataset
|
||||||
dvc.add(str(dataset))
|
bench_dvc("add", dataset)
|
||||||
dvc.push()
|
bench_dvc("push")
|
||||||
|
|
||||||
# Add more files to the dataset
|
# Add more files to the dataset
|
||||||
shutil.copytree("partial-copy", dataset, dirs_exist_ok=True)
|
shutil.copytree("partial-copy", dataset, dirs_exist_ok=True)
|
||||||
@@ -39,8 +39,8 @@ def test_partial_add(bench_dvc, tmp_dir, dvc, dataset, remote):
|
|||||||
def test_partial_remove(bench_dvc, tmp_dir, dvc, dataset, remote):
|
def test_partial_remove(bench_dvc, tmp_dir, dvc, dataset, remote):
|
||||||
random.seed(5232)
|
random.seed(5232)
|
||||||
# Add/push full dataset
|
# Add/push full dataset
|
||||||
dvc.add(str(dataset))
|
bench_dvc("add", dataset)
|
||||||
dvc.push()
|
bench_dvc("push")
|
||||||
|
|
||||||
# Remove some files
|
# Remove some files
|
||||||
for f in glob.glob("*", root_dir=dataset, recursive=True): # type: ignore[call-arg]
|
for f in glob.glob("*", root_dir=dataset, recursive=True): # type: ignore[call-arg]
|
||||||
|
|||||||
Reference in New Issue
Block a user