Files
winutil/tools/title-screen/test_automate_title_screen.py
T
Omar 41e4f35897 Automate WinUtil title screen generation (#4965)
* feat: add title screen generation tooling

Add local automation for capturing WinUtil in Light and Dark themes
and generating the composite title-screen image.

* ci: automate title screen updates

Add a manual Windows workflow that compiles WinUtil, generates the
Light and Dark composite, and opens an image-only pull request.

* docs: update AGENTS.md and SPEC.md with title-screen generation details

* fix: address review comments

Tested image is correct, SHA-256 hash is identical to the previously verified output.

* fix: deselect bitmap before reading capture pixels
2026-09-02 16:10:44 -05:00

20 lines
547 B
Python

"""Non-GUI tests for title-screen automation validation helpers."""
import unittest
from PIL import Image
from automate_title_screen import is_dark_mode
class AutomateTitleScreenTests(unittest.TestCase):
def test_classifies_dark_and_light_captures(self):
dark_image = Image.new("RGB", (100, 100), (35, 35, 35))
light_image = Image.new("RGB", (100, 100), (240, 240, 240))
self.assertTrue(is_dark_mode(dark_image))
self.assertFalse(is_dark_mode(light_image))
if __name__ == "__main__":
unittest.main()