Skip to content

Commit

Permalink
improve repro --pull --run-cache test
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Berenbaum authored and dberenbaum committed May 23, 2024
1 parent c0d7e2a commit 83ec952
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/func/repro/test_repro_pull.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 83ec952

Please sign in to comment.