(tmp_dir, dvc)
| 322 | |
| 323 | |
| 324 | def test_add_commit(tmp_dir, dvc): |
| 325 | tmp_dir.gen("foo", "foo") |
| 326 | ret = main(["add", "foo", "--no-commit"]) |
| 327 | assert ret == 0 |
| 328 | assert os.path.isfile("foo") |
| 329 | assert not os.path.exists(dvc.cache.local.path) |
| 330 | |
| 331 | ret = main(["commit", "foo.dvc"]) |
| 332 | assert ret == 0 |
| 333 | assert os.path.isfile("foo") |
| 334 | assert dvc.cache.local.exists("acbd18db4cc2f85cedef654fccc4a4d8") |
| 335 | |
| 336 | |
| 337 | def test_should_collect_dir_cache_only_once(mocker, tmp_dir, dvc): |