mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
See https://github.com/iterative/dvc-data/pull/601 that fixed the issue. The test is based on reproduction steps from: https://github.com/iterative/dvc/issues/4344#issuecomment-2822000925
This commit is contained in:
@@ -744,3 +744,12 @@ def test_checkout_dir_compat(tmp_dir, dvc):
|
||||
remove("data")
|
||||
dvc.checkout()
|
||||
assert (tmp_dir / "data").read_text() == {"foo": "foo"}
|
||||
|
||||
|
||||
def test_checkout_cleanup_properly_on_untracked_nested_directories(tmp_dir, scm, dvc):
|
||||
tmp_dir.dvc_gen({"datasets": {"dir1": {"file1": "file1"}}})
|
||||
tmp_dir.gen({"datasets": {"dir2": {"dir3": {"file2": "file2"}}}})
|
||||
|
||||
dvc.checkout(force=True)
|
||||
|
||||
assert (tmp_dir / "datasets").read_text() == {"dir1": {"file1": "file1"}}
|
||||
|
||||
Reference in New Issue
Block a user