Skip to content

Commit

Permalink
tests: move run cache test to test_remote
Browse files Browse the repository at this point in the history
  • Loading branch information
skshetry committed May 24, 2022
1 parent 942a080 commit 68b0d61
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 19 deletions.
15 changes: 15 additions & 0 deletions dvc/testing/test_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,18 @@ def _check_status(status, **kwargs):

status_dir = dvc.cloud.status(dir_hashes)
_check_status(status_dir, ok=dir_hashes)

def test_stage_cache_push_pull(self, tmp_dir, dvc, remote):
tmp_dir.gen("foo", "foo")
stage = dvc.stage.add(
deps=["foo"], outs=["bar"], name="copy-foo-bar", cmd="cp foo bar"
)
dvc.reproduce(stage.addressing)
assert dvc.push(run_cache=True) == 2

stage_cache_dir = tmp_dir / dvc.stage_cache.cache_dir
expected = list(stage_cache_dir.rglob("*"))
shutil.rmtree(stage_cache_dir)

dvc.pull(run_cache=True)
assert list(stage_cache_dir.rglob("*")) == expected
19 changes: 0 additions & 19 deletions dvc/testing/test_run_cache.py

This file was deleted.

0 comments on commit 68b0d61

Please sign in to comment.