| 250 | |
| 251 | |
| 252 | def 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 | |
| 275 | def test_missing_cache_missing_workspace(tmp_dir, dvc, scm): |