]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-69134: Harden tkinter GUI tests that depend on a mapped widget (GH-152499...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 28 Jun 2026 17:38:01 +0000 (19:38 +0200)
committerGitHub <noreply@github.com>
Sun, 28 Jun 2026 17:38:01 +0000 (17:38 +0000)
commit7d6fc2bb9ab6c3f2a8bc7e623b281d48e954a741
tree0ed196040fd931c596742dcb57a9afe98f4f2885
parentbdee58826a2d3490f62db4d3f3c6541dc8310698
[3.14] gh-69134: Harden tkinter GUI tests that depend on a mapped widget (GH-152499) (GH-152517)

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