| 273 | |
| 274 | |
| 275 | def 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 | |
| 300 | def test_git_committed_missing_cache_workspace_exists(tmp_dir, dvc, scm): |