Skip to content

Commit b5213f4

Browse files
authored
[2.7] bpo-27313: Avoid test_ttk_guionly ComboboxTest fail with macOS Cocoa Tk (GH-12015)
1 parent 72ff2f7 commit b5213f4

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Lib/lib-tk/test/test_ttk/test_widgets.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,12 @@ def test_identify(self):
331331
self.entry.wait_visibility()
332332
self.entry.update_idletasks()
333333

334-
self.assertEqual(self.entry.identify(5, 5), "textarea")
334+
# bpo-27313: macOS Cocoa widget differs from X, allow either
335+
if sys.platform == 'darwin':
336+
self.assertIn(self.entry.identify(5, 5),
337+
("textarea", "Combobox.button") )
338+
else:
339+
self.assertEqual(self.entry.identify(5, 5), "textarea")
335340
self.assertEqual(self.entry.identify(-1, -1), "")
336341

337342
self.assertRaises(tkinter.TclError, self.entry.identify, None, 5)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Avoid test_ttk_guionly ComboboxTest failure with macOS Cocoa Tk.

0 commit comments

Comments
 (0)