Skip to content

Commit

Permalink
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 committed Mar 12, 2024
1 parent b9cf283 commit ea70ba8
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 @@ -267,7 +267,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 @@ -283,7 +282,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 @@ -293,7 +291,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 ea70ba8

Please sign in to comment.