diff --git a/src/darker/tests/test_git.py b/src/darker/tests/test_git.py index da170346b..a4d5cc251 100644 --- a/src/darker/tests/test_git.py +++ b/src/darker/tests/test_git.py @@ -220,11 +220,13 @@ def test_git_diff_name_only(git_repo): first = git_repo.get_hash() git_repo.add({"a.py": "A", "b.dy": "B"}, commit="only a.py modified") git_repo.rename("c.py", "x.py", commit="rename c.py to x.py") + second = git_repo.get_hash() result = git._git_diff_name_only( first, second, {Path("a.py"), Path("c.py"), Path("Z.py")}, git_repo.root ) + assert result == {Path("a.py")}