Skip to content

Commit

Permalink
test: fix failing tests
Browse files Browse the repository at this point in the history
With the added diff filter some tests needed updating to reflect the change
  • Loading branch information
Svenito authored and akaihola committed Aug 1, 2024
1 parent 75054cc commit bd777f3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 0 additions & 3 deletions src/darker/tests/test_git.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,6 @@ def test_git_get_modified_python_files(git_repo, modify_paths, paths, expect):
_description="from master to worktree and index on branch",
revrange="master..",
expect={
"del_master.py",
"mod_master.py",
"mod_both.py",
"mod_branch.py",
Expand All @@ -354,7 +353,6 @@ def test_git_get_modified_python_files(git_repo, modify_paths, paths, expect):
),
revrange="master..HEAD",
expect={
"del_master.py",
"mod_master.py",
"mod_both.py",
"mod_branch.py",
Expand All @@ -364,7 +362,6 @@ def test_git_get_modified_python_files(git_repo, modify_paths, paths, expect):
_description="from master to branch, excluding worktree and index",
revrange="master..branch",
expect={
"del_master.py",
"mod_master.py",
"mod_both.py",
"mod_branch.py",
Expand Down
4 changes: 3 additions & 1 deletion src/darker/tests/test_main_revision.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@
worktree_content=b"USERMOD=1\n",
expect={"+1", "+1M0", "+2-1", "+2", "+2M1-0", "+2M1"},
),
dict(revision="HEAD~2", worktree_content=b"ORIGINAL=1\n", expect={"+1", "+1M0"}),
# These are empty because git diff reports these are renamed files.
# We only care about added or modified files. See PR #454
dict(revision="HEAD~2", worktree_content=b"ORIGINAL=1\n", expect=set()),
dict(
revision="HEAD~2",
worktree_content=b"MODIFIED=1\n",
Expand Down

0 comments on commit bd777f3

Please sign in to comment.