tests: isolate the camera preview blit test on its own screen - #291
Merged
ThomasFarstrike merged 1 commit intoSep 3, 2026
Merged
Conversation
test_graphical_campreview_scaleblit.py failed in CI (main @ a7cf4e8) when run after other graphical tests in the same process: it placed the image on whatever screen was active, and a leftover screen with a layout repositioned the child, so the sampler read background pixels. Run alone it started on a bare screen and passed. - Load a fresh bare screen for each test and restore the previous one. - Sample relative to the image's actual position. - For the 1:1 control, size the widget to its content: a scaled image is placed about its pivot, so unscaled content sat centered (offset by one bar) inside the larger preview-sized box. Verified passing both alone and after other graphical tests. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the CI failure on
main(Build LVGL MicroPython on Linux for arm64→Run unit tests, run 33729558187):tests/test_graphical_campreview_scaleblit.py, added in #285, is order-dependent — sorry about that.Cause: the test placed its image on
lv.screen_active()and sampled fixed coordinates. Run alone it starts on a bare screen and passes; in the full-suite process an earlier graphical test leaves a screen with a layout active, which repositions the child, so the sampler read background pixels (the grays in the CI assertion). The 1:1 control additionally sat centered inside the 240 px preview-sized widget box (a scaled image is placed about its pivot), so its bars read offset by exactly one bar.Fix (test only, no runtime code touched):
Verified: passes alone, passes after other graphical tests, and the whole
tests/test_graphical_*.pyset (67 files) passes in one runner invocation like CI.🤖 Generated with Claude Code