Refactor Windows build script for improved readability and consistency

- Cleaned up whitespace and formatting in build_windows.py for better readability.
- Consolidated environment variable setup for stdout and stderr.
- Streamlined subprocess command calls by removing unnecessary line breaks.
- Enhanced error handling and logging for better debugging.
- Updated comments for clarity and consistency.

Update updater.py to improve checksum verification logic

- Modified checksum verification to prioritize specific .sha256 files matching installer names.
- Added fallback logic to check for any .sha256 file if no specific match is found.

Enhance update manager UI with download progress dialog

- Introduced DownloadingDialog to provide feedback during update downloads.
- Updated MainWindow to manage the new downloading dialog and handle its lifecycle.
- Removed the skip version functionality from the update dialog as per new requirements.

Refactor update manager UI tests for clarity and maintainability

- Removed tests related to the skip version functionality.
- Updated test cases to reflect changes in the update manager UI.
- Ensured all tests are aligned with the new dialog structure and signal emissions.
This commit is contained in:
claudi 2026-02-25 14:38:33 +01:00
parent 88d9f200ab
commit 025e9c888c
10 changed files with 3066 additions and 3088 deletions

View file

@ -76,24 +76,17 @@ class TestUpdateAvailableDialog:
def test_signals_emitted_update_now(self, qapp, qtbot):
"""Test update now signal is emitted."""
dialog = UpdateAvailableDialog("0.0.2", "Changes")
with qtbot.waitSignal(dialog.update_now):
dialog.update_now_btn.click()
def test_signals_emitted_update_later(self, qapp, qtbot):
"""Test update later signal is emitted."""
dialog = UpdateAvailableDialog("0.0.2", "Changes")
with qtbot.waitSignal(dialog.update_later):
dialog.update_later_btn.click()
def test_signals_emitted_skip(self, qapp, qtbot):
"""Test skip version signal is emitted."""
dialog = UpdateAvailableDialog("0.0.2", "Changes")
with qtbot.waitSignal(dialog.skip_version):
dialog.skip_btn.click()
class TestDownloadingDialog:
"""Tests for DownloadingDialog."""
@ -134,7 +127,7 @@ class TestDownloadingDialog:
def test_cancel_signal(self, qapp, qtbot):
"""Test cancel signal is emitted."""
dialog = DownloadingDialog()
with qtbot.waitSignal(dialog.cancel_download):
dialog.cancel_btn.click()
@ -156,7 +149,7 @@ class TestInstallDialog:
def test_install_signal(self, qapp, qtbot):
"""Test install signal is emitted."""
dialog = InstallDialog()
with qtbot.waitSignal(dialog.install_now):
dialog.install_btn.click()
@ -211,13 +204,13 @@ class TestErrorDialog:
def test_retry_signal(self, qapp, qtbot):
"""Test retry signal is emitted."""
dialog = ErrorDialog("Error")
with qtbot.waitSignal(dialog.retry):
dialog.retry_btn.click()
def test_manual_download_signal(self, qapp, qtbot):
"""Test manual download signal is emitted."""
dialog = ErrorDialog("Error")
with qtbot.waitSignal(dialog.manual_download):
dialog.manual_btn.click()