improve repro --pull --run-cache test

This commit is contained in:
Dave Berenbaum
2024-05-23 14:26:42 -04:00
committed by Dave Berenbaum
parent c0d7e2a8de
commit 83ec952da1
+5 -2
View File
@@ -51,11 +51,14 @@ def test_repro_skip_pull_if_no_run_cache_is_passed(tmp_dir, dvc, mocker, local_r
(foo,) = tmp_dir.dvc_gen("foo", "foo")
dvc.push()
spy_pull = mocker.spy(dvc.stage_cache, "pull")
dvc.stage.add(name="copy-foo", cmd="cp foo bar", deps=["foo"], outs=["bar"])
assert dvc.reproduce(pull=True)
remove("foo")
remove(foo.outs[0].cache_path)
remove("dvc.lock")
spy_pull = mocker.spy(dvc.stage_cache, "pull")
assert dvc.reproduce(pull=True, run_cache=False)
assert not spy_pull.called