Skip to content

[3.13] gh-153716: Harden ttk/tkinter GUI tests against display scaling (GH-153717)#153743

Merged
serhiy-storchaka merged 1 commit into
python:3.13from
serhiy-storchaka:backport-87411d0-3.13
Jul 15, 2026
Merged

[3.13] gh-153716: Harden ttk/tkinter GUI tests against display scaling (GH-153717)#153743
serhiy-storchaka merged 1 commit into
python:3.13from
serhiy-storchaka:backport-87411d0-3.13

Conversation

@serhiy-storchaka

Copy link
Copy Markdown
Member

Manual backport of #153717 (gh-153716) to 3.13.

Conflicts in Lib/test/test_ttk/test_widgets.py, in the Combobox/Spinbox arrow-click helpers: 3.13 had assertRegex(identify(...), r'...arrow\Z'), which the PR replaced with the regex-free _arrow_x scan. Resolved by taking the PR's version (which also sidesteps \z, unsupported on 3.13). test_tkinter/test_widgets.py merged cleanly.

Verified: the affected test_ttk tests and test_tkinter ScaleTest.test_identify pass on Tk 8.6 at DPI 96 and 288.

…pythonGH-153717)

Compute probe coordinates from each widget's own realized geometry
instead of hardcoding pixels such as (5, 5) or width - 5, which land on
a different element, or miss it entirely, at a high display scaling.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
(cherry picked from commit 87411d0)
@bedevere-app bedevere-app Bot added the tests Tests in the Lib/test dir label Jul 15, 2026
@serhiy-storchaka serhiy-storchaka enabled auto-merge (squash) July 15, 2026 05:26
@serhiy-storchaka serhiy-storchaka merged commit 0f1e563 into python:3.13 Jul 15, 2026
42 checks passed
@serhiy-storchaka serhiy-storchaka deleted the backport-87411d0-3.13 branch July 15, 2026 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant