From b773ba73cf71af1638b7d2d7c20220986ca361c8 Mon Sep 17 00:00:00 2001 From: Saugat Pachhai Date: Sat, 15 Aug 2020 15:39:29 +0000 Subject: [PATCH] tests: add .dvcignore on the tests expectations (#4396) Since #4229, we have started creating .dvcignore file after `dvc init` This commit only adds that in assertions --- tests/unit/repo/test_repo_tree.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/unit/repo/test_repo_tree.py b/tests/unit/repo/test_repo_tree.py index 9a4d5112c1..aa54a3bd3c 100644 --- a/tests/unit/repo/test_repo_tree.py +++ b/tests/unit/repo/test_repo_tree.py @@ -227,7 +227,6 @@ def f(*args, **kwargs): assert tree.exists(subrepo1 / "foo") is True assert tree.exists(subrepo1 / "bar") is False - assert tree.isfile(subrepo1 / "foo") is True assert tree.isfile(subrepo1 / "foo") is True assert tree.isfile(subrepo1 / "dir1" / "bar") is True assert tree.isfile(subrepo1 / "dir1") is False @@ -244,7 +243,6 @@ def f(*args, **kwargs): assert tree.exists(subrepo2 / "lorem") is True assert tree.exists(subrepo2 / "ipsum") is False - assert tree.isfile(subrepo2 / "lorem") is True assert tree.isfile(subrepo2 / "lorem") is True assert tree.isfile(subrepo2 / "dir2" / "ipsum") is True assert tree.isfile(subrepo2 / "dir2") is False @@ -294,10 +292,12 @@ def test_subrepo_walk(tmp_dir, scm, dvc, dvcfiles, extra_expected): PathInfo("dir") / "repo", PathInfo("dir") / "repo.txt", PathInfo("dir") / "repo2", + PathInfo("dir") / "repo" / ".dvcignore", PathInfo("dir") / "repo" / ".gitignore", PathInfo("dir") / "repo" / "foo", PathInfo("dir") / "repo" / "dir1", PathInfo("dir") / "repo" / "dir1" / "bar", + PathInfo("dir") / "repo2" / ".dvcignore", PathInfo("dir") / "repo2" / ".gitignore", PathInfo("dir") / "repo2" / "lorem", PathInfo("dir") / "repo2" / "dir2", @@ -330,6 +330,7 @@ def test_repo_tree_no_subrepos(tmp_dir, dvc, scm): dvc.tree._reset() tree = RepoTree(dvc, subrepos=False, fetch=True) expected = [ + tmp_dir / ".dvcignore", tmp_dir / ".gitignore", tmp_dir / "lorem", tmp_dir / "lorem.dvc",