]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-69134: Harden tkinter GUI tests that depend on a mapped widget (GH-152499)
authorSerhiy Storchaka <storchaka@gmail.com>
Sun, 28 Jun 2026 17:11:47 +0000 (20:11 +0300)
committerGitHub <noreply@github.com>
Sun, 28 Jun 2026 17:11:47 +0000 (20:11 +0300)
commit0fff6bd86cf0224152c509e295d3cbbd209098f3
treeaef43aa50fa001cd16245c470d026617abee681a
parent37b238f1a6f0d8738e44ccc516ca2a476c38e5ce
gh-69134: Harden tkinter GUI tests that depend on a mapped widget (GH-152499)

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.

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