Skip to content

Commit

Permalink
bpo-27313: Avoid test_ttk_guionly ComboboxTest fail with macOS Cocoa …
Browse files Browse the repository at this point in the history
…Tk (GH-12011) (GH-12013)

(cherry picked from commit aeca373)

Co-authored-by: Ned Deily <nad@python.org>
  • Loading branch information
miss-islington and ned-deily committed Feb 24, 2019
1 parent 2a3af94 commit 1dee456
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Lib/tkinter/test/test_ttk/test_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,12 @@ def test_identify(self):
self.entry.wait_visibility()
self.entry.update_idletasks()

self.assertEqual(self.entry.identify(5, 5), "textarea")
# bpo-27313: macOS Cocoa widget differs from X, allow either
if sys.platform == 'darwin':
self.assertIn(self.entry.identify(5, 5),
("textarea", "Combobox.button") )
else:
self.assertEqual(self.entry.identify(5, 5), "textarea")
self.assertEqual(self.entry.identify(-1, -1), "")

self.assertRaises(tkinter.TclError, self.entry.identify, None, 5)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Avoid test_ttk_guionly ComboboxTest failure with macOS Cocoa Tk.

0 comments on commit 1dee456

Please sign in to comment.