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

Function test_subdir

tests/func/test_data_status.py:221–236  ·  view source on GitHub ↗
(tmp_dir, scm)

Source from the content-addressed store, hash-verified

219
220
221def test_subdir(tmp_dir, scm):
222 subrepo = tmp_dir / "sub"
223 make_subrepo(subrepo, scm)
224
225 with subrepo.chdir():
226 subrepo.dvc_gen({"dir": {"foo": "foo"}}, commit="add dir")
227 subrepo.dvc_gen("bar", "bar", commit="add foo")
228 subrepo.gen("untracked", "untracked")
229
230 dvc = subrepo.dvc
231 assert dvc.data_status(granular=True, untracked_files="all") == {
232 **EMPTY_STATUS,
233 "git": M.dict(),
234 "unchanged": M.unordered("bar", join("dir", ""), join("dir", "foo")),
235 "untracked": ["untracked"],
236 }
237
238
239def test_untracked_newly_added_files(tmp_dir, dvc, scm):

Callers

nothing calls this directly

Calls 5

make_subrepoFunction · 0.90
joinFunction · 0.85
dvc_genMethod · 0.80
chdirMethod · 0.45
genMethod · 0.45

Tested by

no test coverage detected