Skip to content

Commit d3fbde5

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

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,5 +1,7 @@
11
import collections.abc
22
import functools
3+
import platform
4+
import sys
35
import unittest
46
import weakref
57
import tkinter
@@ -946,12 +948,27 @@ def test_wm_attribute(self):
946948

947949
def test_wm_iconbitmap(self):
948950
t = tkinter.Toplevel(self.root)
951+
patchlevel = get_tk_patchlevel(t)
952+
953+
if (
954+
t._windowingsystem == 'aqua'
955+
and sys.platform == 'darwin'
956+
and platform.machine() == 'x86_64'
957+
and platform.mac_ver()[0].startswith('26.')
958+
and (
959+
patchlevel[:3] <= (8, 6, 17)
960+
or (9, 0) <= patchlevel[:3] <= (9, 0, 3)
961+
)
962+
):
963+
# https://github.com/python/cpython/issues/146531
964+
# Tk bug 4a2070f0d3a99aa412bc582d386d575ca2f37323
965+
self.skipTest('wm iconbitmap hangs on macOS 26 Intel')
966+
949967
self.assertEqual(t.wm_iconbitmap(), '')
950968
t.wm_iconbitmap('hourglass')
951969
bug = False
952970
if t._windowingsystem == 'aqua':
953971
# Tk bug 13ac26b35dc55f7c37f70b39d59d7ef3e63017c8.
954-
patchlevel = get_tk_patchlevel(t)
955972
if patchlevel < (8, 6, 17) or (9, 0) <= patchlevel < (9, 0, 2):
956973
bug = True
957974
if not bug:

0 commit comments

Comments
 (0)