(tmp_dir, dvc, scm)
| 170 | |
| 171 | |
| 172 | def test_gitignore_basic(tmp_dir, dvc, scm): |
| 173 | tmp_dir.gen("foo", "foo") |
| 174 | assert not os.path.exists(scm.GITIGNORE) |
| 175 | |
| 176 | tmp_dir.dvc_gen("file1", "random text1", commit="add file1") |
| 177 | tmp_dir.dvc_gen("file2", "random text2", commit="add file2") |
| 178 | dvc.run( |
| 179 | cmd="cp foo file3", |
| 180 | deps=["foo"], |
| 181 | outs_no_cache=["file3"], |
| 182 | name="cp-foo-file3", |
| 183 | ) |
| 184 | assert get_gitignore_content() == ["/file1", "/file2"] |
| 185 | |
| 186 | |
| 187 | def test_gitignore_when_checkout(tmp_dir, dvc, scm): |
nothing calls this directly
no test coverage detected