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

Function test_missing_cache_workspace_exists

tests/func/test_data_status.py:252–272  ·  view source on GitHub ↗
(tmp_dir, dvc, scm)

Source from the content-addressed store, hash-verified

250
251
252def test_missing_cache_workspace_exists(tmp_dir, dvc, scm):
253 tmp_dir.dvc_gen({"dir": {"foo": "foo", "bar": "bar"}})
254 tmp_dir.dvc_gen("foobar", "foobar")
255 remove(dvc.cache.repo.path)
256
257 assert dvc.data_status(untracked_files="all") == {
258 **EMPTY_STATUS,
259 "untracked": M.unordered("foobar.dvc", "dir.dvc", ".gitignore"),
260 "committed": {"added": M.unordered("foobar", join("dir", ""))},
261 "not_in_cache": M.unordered("foobar", join("dir", "")),
262 "git": M.dict(),
263 }
264
265 assert dvc.data_status(granular=True, untracked_files="all") == {
266 **EMPTY_STATUS,
267 "untracked": M.unordered("foobar.dvc", "dir.dvc", ".gitignore"),
268 "committed": {"added": M.unordered("foobar", join("dir", ""))},
269 "uncommitted": {"unknown": M.unordered(join("dir", "foo"), join("dir", "bar"))},
270 "not_in_cache": M.unordered("foobar", join("dir", "")),
271 "git": M.dict(),
272 }
273
274
275def test_missing_cache_missing_workspace(tmp_dir, dvc, scm):

Callers

nothing calls this directly

Calls 3

removeFunction · 0.90
joinFunction · 0.85
dvc_genMethod · 0.80

Tested by

no test coverage detected