Browse Source

bpo-27313: Avoid test_ttk_guionly ComboboxTest fail with macOS Cocoa Tk (GH-12011)

pull/12016/head
Ned Deily 8 years ago
committed by GitHub
parent
commit
aeca373b33
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      Lib/tkinter/test/test_ttk/test_widgets.py
  2. 1
      Misc/NEWS.d/next/Tests/2019-02-24-01-58-38.bpo-27313.Sj9veH.rst

7
Lib/tkinter/test/test_ttk/test_widgets.py

@ -329,7 +329,12 @@ class EntryTest(AbstractWidgetTest, unittest.TestCase):
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)

1
Misc/NEWS.d/next/Tests/2019-02-24-01-58-38.bpo-27313.Sj9veH.rst

@ -0,0 +1 @@
Avoid test_ttk_guionly ComboboxTest failure with macOS Cocoa Tk.
Loading…
Cancel
Save