test: sample padding pixel so movestate colors survive Linux fonts
CI / lint (push) Skipped
CI / test (3.11) (push) Skipped
CI / test (3.12) (push) Skipped
CI / test (3.13) (push) Skipped
CI / test-with-beamline-plugins (pxi_bec) (push) Skipped
CI / test-with-beamline-plugins (pxii_bec) (push) Skipped
CI / test-with-beamline-plugins (pxiii_bec) (push) Skipped
CI / lint (pull_request) Canceled after 21s
CI / test (3.11) (pull_request) Canceled after 16s
CI / test (3.12) (pull_request) Canceled after 11s
CI / test (3.13) (pull_request) Canceled after 12s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Canceled after 7s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Canceled after 7s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Canceled after 2s
CI / test-with-coverage (pull_request) Canceled after 2s
CI / coverage-analysis (pull_request) Canceled after 0s

x=20 sits on a digit glyph with CI's Linux fonts, so the assert compared
an antialiased glyph blend against the pure background. The padding area
(border 1px + padding 6px) can never contain text on any font.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0147jE48bQUTm9AqNQApT6b2
This commit is contained in:
duan_jandClaude Fable 5 authored and duan_j committed 2026-08-24 13:40:03 +02:00
1 parent fd2c682352
commit 3354745648
1 file changed
+5 -1
+5 -1
View File
@@ -120,8 +120,12 @@ def test_spin_move_state_colors_actually_render(qtbot):
spin.show()
def value_area_color():
# Sample inside the left padding (1px border + 6px QSS padding), not
# the text area: glyph positions are font-dependent and on CI's Linux
# fonts x=20 lands on a digit of "12.40", returning an antialiased
# glyph/background blend instead of the plain background color.
img = spin.grab().toImage()
return img.pixelColor(20, img.height() // 2)
return img.pixelColor(4, img.height() // 2)
state.update_actual(12.0)
neutral = value_area_color()