]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-69134: Harden tkinter GUI tests that depend on a mapped widget (GH-152499...
authorSerhiy Storchaka <storchaka@gmail.com>
Sun, 28 Jun 2026 17:50:04 +0000 (20:50 +0300)
committerGitHub <noreply@github.com>
Sun, 28 Jun 2026 17:50:04 +0000 (17:50 +0000)
commit7c6d5296875d98f9697540acc75b7a52df93c3a6
treec56cdfa3cd9a710e12bafacb4953ab66bb2d30df
parent1e011ab10956c418f7ab19e2b46855ed6ee87626
[3.13] gh-69134: Harden tkinter GUI tests that depend on a mapped widget (GH-152499) (GH-152518)

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: 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