Skip to content

Commit 4cd2c02

Browse files
gh-151678: Skip the bad-bitmap check for Canvas on Aqua
create_bitmap() does not report an unknown bitmap name on macOS/Aqua, where bitmaps are resolved lazily. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 3cd6b95 commit 4cd2c02

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Lib/test/test_tkinter/test_widgets.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,9 @@ def test_create_bitmap(self):
10301030
foreground='red', background='blue')
10311031
self.assertEqual(str(c.itemcget(i, 'foreground')), 'red')
10321032
self.assertEqual(str(c.itemcget(i, 'background')), 'blue')
1033-
self.assertRaises(TclError, c.create_bitmap, 10, 20, bitmap='spam')
1033+
if c._windowingsystem != 'aqua':
1034+
# Aqua resolves bitmaps lazily and does not report a bad name here.
1035+
self.assertRaises(TclError, c.create_bitmap, 10, 20, bitmap='spam')
10341036

10351037
def test_create_image(self):
10361038
c = self.create()

0 commit comments

Comments
 (0)