[2.7] bpo-27313: Avoid test_ttk_guionly ComboboxTest fail with macOS Cocoa Tk by ned-deily · Pull Request #12015 · python/cpython

Expand Up @@ -331,7 +331,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