MCPcopy
hub / github.com/treeverse/dvc / test_gitignore_basic

Function test_gitignore_basic

tests/func/test_checkout.py:172–184  ·  view source on GitHub ↗
(tmp_dir, dvc, scm)

Source from the content-addressed store, hash-verified

170
171
172def 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
187def test_gitignore_when_checkout(tmp_dir, dvc, scm):

Callers

nothing calls this directly

Calls 5

get_gitignore_contentFunction · 0.90
dvc_genMethod · 0.80
genMethod · 0.45
existsMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected