]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-153741: Harden IDLE GUI tests for newer Tk and display scaling (#153742)
authorSerhiy Storchaka <storchaka@gmail.com>
Wed, 22 Jul 2026 01:16:50 +0000 (04:16 +0300)
committerGitHub <noreply@github.com>
Wed, 22 Jul 2026 01:16:50 +0000 (21:16 -0400)
commita2581ebc7a93ec573f64d3a5e29cbd9053de7a1f
treeffe8532d05c5abe7653da5596cda4cac0f6f424c
parentf429fb36a16134a2a0e839d0f385eb8fee280de4
gh-153741: Harden IDLE GUI tests for newer Tk and display scaling (#153742)

In test_sidebar.test_mousewheel, only use the X11 <Button-4>/<Button-5> events when testing on
x11 Tk before 8.7.  Otherwise, use <Mousewheel> as on other systems.

In test_configdialog, assert the 'disabled' state flag alone instead of
the exact ttk state tuple (which transient pointer states break), and
restore the tests' method masks with addCleanup().

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Lib/idlelib/idle_test/test_configdialog.py
Lib/idlelib/idle_test/test_sidebar.py