(tmp_dir, dvc, scm)
| 10 | |
| 11 | |
| 12 | def test_move(tmp_dir, dvc, scm): |
| 13 | tmp_dir.dvc_gen("foo", "bar") |
| 14 | assert (tmp_dir / "foo.dvc").exists() |
| 15 | dvc.move("foo", "bar") |
| 16 | |
| 17 | assert not (tmp_dir / "foo.dvc").exists() |
| 18 | assert (tmp_dir / "bar.dvc").exists() |
| 19 | assert not (tmp_dir / "foo").is_file() |
| 20 | assert (tmp_dir / "bar").is_file() |
| 21 | # should only have the new path in the .gitignore, and only once |
| 22 | assert (tmp_dir / ".gitignore").read_text().splitlines() == ["/bar"] |
| 23 | |
| 24 | |
| 25 | def test_move_non_existent_file(dvc): |