(tmp_dir, dvc)
| 223 | |
| 224 | |
| 225 | def test_checkout_empty_dir(tmp_dir, dvc): |
| 226 | empty_dir = tmp_dir / "empty_dir" |
| 227 | empty_dir.mkdir() |
| 228 | (stage,) = dvc.add("empty_dir") |
| 229 | |
| 230 | stage.outs[0].remove() |
| 231 | assert not empty_dir.exists() |
| 232 | |
| 233 | assert dvc.checkout(force=True) == empty_checkout | { |
| 234 | "added": [os.path.join("empty_dir", "")], |
| 235 | "stats": empty_stats | {"added": 0}, |
| 236 | } |
| 237 | assert empty_dir.is_dir() |
| 238 | assert not list(empty_dir.iterdir()) |
| 239 | |
| 240 | |
| 241 | def test_checkout_not_cached_file(tmp_dir, dvc): |