Merge branch 'develop' into enhancement/2668/refactored-winsparklepy

This commit is contained in:
David Sangrey authored and GitHub committed 2026-05-31 15:50:06 -04:00
commit b038e8a8dd
2 files changed
+16 -10

No files matched your search

+7 -2
View File
@@ -100,7 +100,12 @@ jobs:
####################################################################
# Ensure all tests pass
####################################################################
- name: PyTest tests
- name: Install Virtual Framebuffer Dependecies
run: |
pytest
sudo apt-get update
sudo apt-get install -y xvfb python3-tk
- name: Run Tests with Virtual Display
run: |
xvfb-run --auto-servernum pytest
####################################################################
+9 -8
View File
@@ -2,6 +2,7 @@
# mypy: ignore-errors
"""Test the Updater."""
import sys
import pytest
import pathlib
import hashlib
@@ -144,12 +145,12 @@ class TestVersionChecking:
class TestWinSparkleInit:
@patch("sys.platform", "win32")
@patch("ctypes.cdll.WinSparkle", create=True)
def test_winsparkle_init_success(self, mock_ws):
@pytest.mark.skipif(sys.platform != "win32", reason="WinSparkle update logic is Windows-only")
def test_winsparkle_init_success(self):
"""Verify WinSparkle initialization logic on Windows."""
with patch("update.get_update_feed", return_value="http://feed"):
with patch("update.appversion_nobuild", return_value="5.0.0"):
updater = update.Updater(provider="external")
assert mock_ws.win_sparkle_init.called
assert mock_ws.win_sparkle_set_appcast_url.called
with patch("ctypes.cdll.WinSparkle", create=True) as mock_ws:
with patch("update.get_update_feed", return_value="http://feed"):
with patch("update.appversion_nobuild", return_value="5.0.0"):
updater = update.Updater(provider="external")
assert mock_ws.win_sparkle_init.called
assert mock_ws.win_sparkle_set_appcast_url.called