Skip to content

Commit be914bb

Browse files
[3.12] gh-146531: Skip hanging wm iconbitmap test on macOS 26 Intel (GH-148032) (#153188)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
1 parent 9ae4044 commit be914bb

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

Lib/test/test_tkinter/test_misc.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import functools
2+
import platform
3+
import sys
24
import unittest
35
import tkinter
46
import enum
@@ -405,12 +407,27 @@ class WmTest(AbstractTkTest, unittest.TestCase):
405407

406408
def test_wm_iconbitmap(self):
407409
t = tkinter.Toplevel(self.root)
410+
patchlevel = get_tk_patchlevel(t)
411+
412+
if (
413+
t._windowingsystem == 'aqua'
414+
and sys.platform == 'darwin'
415+
and platform.machine() == 'x86_64'
416+
and platform.mac_ver()[0].startswith('26.')
417+
and (
418+
patchlevel[:3] <= (8, 6, 17)
419+
or (9, 0) <= patchlevel[:3] <= (9, 0, 3)
420+
)
421+
):
422+
# https://github.com/python/cpython/issues/146531
423+
# Tk bug 4a2070f0d3a99aa412bc582d386d575ca2f37323
424+
self.skipTest('wm iconbitmap hangs on macOS 26 Intel')
425+
408426
self.assertEqual(t.wm_iconbitmap(), '')
409427
t.wm_iconbitmap('hourglass')
410428
bug = False
411429
if t._windowingsystem == 'aqua':
412430
# Tk bug 13ac26b35dc55f7c37f70b39d59d7ef3e63017c8.
413-
patchlevel = get_tk_patchlevel(t)
414431
if patchlevel < (8, 6, 17) or (9, 0) <= patchlevel < (9, 0, 2):
415432
bug = True
416433
if not bug:

0 commit comments

Comments
 (0)