fix: catch update notification exceptions (#1278)

* feat: add test for failing GitHub API call.

* fix: don't raise exceptions in get_most_recent_release_version.

* style: apply ruff.

* That not should not have been there.
This commit is contained in:
Sola-ris
2026-05-09 08:57:07 +02:00
committed by GitHub
parent cece7920a8
commit 7af7420167
6 changed files with 41 additions and 10 deletions

View File

@@ -0,0 +1,14 @@
from pytestqt.qtbot import QtBot
from tagstudio.qt.mixed.about_modal import AboutModal
def test_github_api_unavailable(qtbot: QtBot, mocker) -> None:
mocker.patch(
"requests.get",
side_effect=ConnectionError(
"Failed to resolve 'api.github.com' ([Errno -3] Temporary failure in name resolution)"
),
)
modal = AboutModal("/tmp")
qtbot.addWidget(modal)