]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.15] gh-69134: Harden tkinter GUI tests that depend on a mapped widget (GH-152499...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 29 Jun 2026 14:23:06 +0000 (16:23 +0200)
committerGitHub <noreply@github.com>
Mon, 29 Jun 2026 14:23:06 +0000 (14:23 +0000)
commit9bea12aaca4b6950b0ff58a798b66350e72cfdcc
tree738399694d593b1db5c6fa0d897bc2158ced438d
parent2a4ffa6f2128308ba5ba81a7c8912fb781a271e0
[3.15] gh-69134: Harden tkinter GUI tests that depend on a mapped widget (GH-152499) (GH-152516)

Add wait_until_mapped() and AbstractTkTest.require_mapped() to
test_tkinter.support and use them to guard the assertions that need a
widget to be actually mapped (winfo_width(), identify(), coords(), ...).
This avoids intermittent failures under window managers that do not map
the widget promptly, without skipping the unrelated checks.
(cherry picked from commit 0fff6bd86cf0224152c509e295d3cbbd209098f3)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Lib/test/test_tkinter/support.py
Lib/test/test_tkinter/test_widgets.py
Lib/test/test_ttk/test_extensions.py
Lib/test/test_ttk/test_widgets.py