MCPcopy
hub / github.com/treeverse/dvc / test_file

Method test_file

dvc/testing/remote_tests.py:297–310  ·  view source on GitHub ↗
(self, tmp_dir, dvc, remote_worktree)

Source from the content-addressed store, hash-verified

295
296class TestRemoteWorktree:
297 def test_file(self, tmp_dir, dvc, remote_worktree):
298 (stage,) = tmp_dir.dvc_gen("foo", "foo")
299
300 dvc.push()
301 assert "version_id" in (tmp_dir / "foo.dvc").read_text()
302 stage = stage.reload()
303 out = stage.outs[0]
304 assert out.meta.version_id
305
306 remove(dvc.cache.local.path)
307 remove(tmp_dir / "foo")
308
309 dvc.pull()
310 assert (tmp_dir / "foo").read_text() == "foo"
311
312 def test_dir(self, tmp_dir, dvc, remote_worktree):
313 (stage,) = tmp_dir.dvc_gen(

Callers

nothing calls this directly

Calls 6

removeFunction · 0.90
dvc_genMethod · 0.80
pushMethod · 0.45
read_textMethod · 0.45
reloadMethod · 0.45
pullMethod · 0.45

Tested by

no test coverage detected