fix case in which if no source PKGBUILDs were updated, an exception will occur

This commit is contained in:
2022-11-03 02:59:15 +02:00
parent 2f8316ecb0
commit 4a5b9d9fa1
10 changed files with 90 additions and 87 deletions

View File

@ -264,7 +264,7 @@ def test_commit(sources: Sources, mocker: MockerFixture) -> None:
commit_message = "Commit message"
sources.commit(local, commit_message=commit_message)
check_output_mock.assert_called_once_with(
"git", "commit", "--all", "--message", commit_message,
"git", "commit", "--allow-empty", "--message", commit_message,
exception=None, cwd=local, logger=pytest.helpers.anyvar(int)
)
@ -278,7 +278,7 @@ def test_commit_autogenerated(sources: Sources, mocker: MockerFixture) -> None:
local = Path("local")
sources.commit(Path("local"))
check_output_mock.assert_called_once_with(
"git", "commit", "--all", "--message", pytest.helpers.anyvar(str, strict=True),
"git", "commit", "--allow-empty", "--message", pytest.helpers.anyvar(str, strict=True),
exception=None, cwd=local, logger=pytest.helpers.anyvar(int)
)