Skip to content

✅ Add unit tests for xcassets image processing#995

Merged
AndreMiras merged 1 commit intomasterfrom
tests/xcassets-unit-tests
Apr 21, 2026
Merged

✅ Add unit tests for xcassets image processing#995
AndreMiras merged 1 commit intomasterfrom
tests/xcassets-unit-tests

Conversation

@AndreMiras
Copy link
Copy Markdown
Member

Cover the two behavior changes from PR #994:

  • _buildimage must not crash on palette-mode PNGs ("P")
  • _generate must invoke sips with -z H W (force exact square) instead of -Z max (bounding box only)

Plus baseline coverage for _buildimage padding/resize and the launchimage code path. Tests run on Linux (no sips required) by mocking sh.sips for the icon path.

Wire a new unit_tests job into the CI workflow running on ubuntu-latest. Kept off macOS on purpose: the absence of sips and friends enforces hermetic mocking in the unit layer, and Ubuntu runners are ~10x cheaper and faster. macOS integration coverage stays in the existing build_python3_kivy* jobs.

Cover the two behavior changes from PR #994:
- _buildimage must not crash on palette-mode PNGs ("P")
- _generate must invoke sips with -z H W (force exact
  square) instead of -Z max (bounding box only)

Plus baseline coverage for _buildimage padding/resize and
the launchimage code path. Tests run on Linux (no sips
required) by mocking sh.sips for the icon path.

Wire a new `unit_tests` job into the CI workflow running
on ubuntu-latest. Kept off macOS on purpose: the absence
of `sips` and friends enforces hermetic mocking in the
unit layer, and Ubuntu runners are ~10x cheaper and
faster. macOS integration coverage stays in the existing
build_python3_kivy* jobs.
@AndreMiras AndreMiras merged commit f35f63f into master Apr 21, 2026
42 of 52 checks passed
@AndreMiras AndreMiras deleted the tests/xcassets-unit-tests branch April 21, 2026 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant