Skip to content

Commit 25d20a6

Browse files
bpo-27313: Avoid test_ttk_guionly ComboboxTest fail with macOS Cocoa Tk (GH-12011)
(cherry picked from commit aeca373) Co-authored-by: Ned Deily <[email protected]>
1 parent 38aea41 commit 25d20a6

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Lib/tkinter/test/test_ttk/test_widgets.py

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

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

335340
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)