mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-10 15:28:34 +01:00
This was working for LocalFileSystem as they work for any directories/path. It's hard to test this these days, as we don't have remote tests inside dvc, so it was not caught. Potentially fixes #7718.
20 lines
527 B
Python
20 lines
527 B
Python
import shutil
|
|
|
|
from .tmp_dir import TmpDir
|
|
|
|
|
|
def test_push_pull(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 = TmpDir(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
|