Skip to content

Commit

Permalink
tests: add .dvcignore on the tests expectations (iterative#4396)
Browse files Browse the repository at this point in the history
Since iterative#4229, we have started creating .dvcignore file after `dvc init`
This commit only adds that in assertions
  • Loading branch information
skshetry authored Aug 15, 2020
1 parent 0b1d4f1 commit b773ba7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/unit/repo/test_repo_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit b773ba7

Please sign in to comment.