Skip to content

Commit 42d8d3f

Browse files
Skip the test depending on the Tk patchlevel.
1 parent 7c6d61a commit 42d8d3f

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Lib/test/test_tkinter/test_misc.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
from tkinter import TclError
55
import enum
66
from test import support
7-
from test.test_tkinter.support import AbstractTkTest, AbstractDefaultRootTest, requires_tk
7+
from test.test_tkinter.support import (AbstractTkTest, AbstractDefaultRootTest,
8+
requires_tk, get_tk_patchlevel)
89

910
support.requires('gui')
1011

@@ -558,7 +559,13 @@ def test_wm_iconbitmap(self):
558559
t = tkinter.Toplevel(self.root)
559560
self.assertEqual(t.wm_iconbitmap(), '')
560561
t.wm_iconbitmap('hourglass')
561-
if t._windowingsystem != 'aqua': # Bug in Tk.
562+
bug = False
563+
if t._windowingsystem == 'aqua':
564+
# Tk bug 13ac26b35dc55f7c37f70b39d59d7ef3e63017c8.
565+
patchlevel = get_tk_patchlevel(t)
566+
if patchlevel < (8, 6, 17) or (9, 0) <= patchlevel < (9, 0, 2):
567+
bug = True
568+
if not bug:
562569
self.assertEqual(t.wm_iconbitmap(), 'hourglass')
563570
self.assertEqual(self.root.wm_iconbitmap(), '')
564571
t.wm_iconbitmap('')

0 commit comments

Comments
 (0)