Skip to content

Commit 78d9049

Browse files
committed
Skip hanging wm iconbitmap test on macOS 26 Intel
1 parent c1a4112 commit 78d9049

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

Lib/test/test_tkinter/test_misc.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import collections.abc
22
import functools
3+
import platform
4+
import sys
35
import unittest
46
import tkinter
57
from tkinter import TclError
@@ -578,12 +580,27 @@ def test_wm_attribute(self):
578580

579581
def test_wm_iconbitmap(self):
580582
t = tkinter.Toplevel(self.root)
583+
patchlevel = get_tk_patchlevel(t)
584+
585+
if (
586+
t._windowingsystem == 'aqua'
587+
and sys.platform == 'darwin'
588+
and platform.machine() == 'x86_64'
589+
and platform.mac_ver()[0].startswith('26.')
590+
and (
591+
patchlevel[:3] <= (8, 6, 17)
592+
or (9, 0) <= patchlevel[:3] <= (9, 0, 3)
593+
)
594+
):
595+
# https://github.com/python/cpython/issues/146531
596+
# Tk bug 4a2070f0d3a99aa412bc582d386d575ca2f37323
597+
self.skipTest('wm iconbitmap hangs on macOS 26 Intel')
598+
581599
self.assertEqual(t.wm_iconbitmap(), '')
582600
t.wm_iconbitmap('hourglass')
583601
bug = False
584602
if t._windowingsystem == 'aqua':
585603
# Tk bug 13ac26b35dc55f7c37f70b39d59d7ef3e63017c8.
586-
patchlevel = get_tk_patchlevel(t)
587604
if patchlevel < (8, 6, 17) or (9, 0) <= patchlevel < (9, 0, 2):
588605
bug = True
589606
if not bug:

0 commit comments

Comments
 (0)