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

Function test_missing_cache_missing_workspace

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

Source from the content-addressed store, hash-verified

273
274
275def test_missing_cache_missing_workspace(tmp_dir, dvc, scm):
276 tmp_dir.dvc_gen({"dir": {"foo": "foo", "bar": "bar"}})
277 tmp_dir.dvc_gen("foobar", "foobar")
278 for path in [dvc.cache.repo.path, "dir", "foobar"]:
279 remove(path)
280
281 assert dvc.data_status(untracked_files="all") == {
282 **EMPTY_STATUS,
283 "untracked": M.unordered("foobar.dvc", "dir.dvc", ".gitignore"),
284 "uncommitted": {"deleted": M.unordered("foobar", join("dir", ""))},
285 "committed": {"added": M.unordered("foobar", join("dir", ""))},
286 "not_in_cache": M.unordered("foobar", join("dir", "")),
287 "git": M.dict(),
288 }
289
290 assert dvc.data_status(granular=True, untracked_files="all") == {
291 **EMPTY_STATUS,
292 "untracked": M.unordered("foobar.dvc", "dir.dvc", ".gitignore"),
293 "uncommitted": {"deleted": M.unordered("foobar", join("dir", ""))},
294 "committed": {"added": M.unordered("foobar", join("dir", ""))},
295 "not_in_cache": M.unordered("foobar", join("dir", "")),
296 "git": M.dict(),
297 }
298
299
300def test_git_committed_missing_cache_workspace_exists(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