'show', 'state', 'style', 'takefocus', 'textvariable',
'validate', 'validatecommand', 'width', 'xscrollcommand',
)
- IDENTIFY_AS = 'Entry.field' if sys.platform == 'darwin' else 'textarea'
+ # bpo-27313: macOS Tk/Tcl may or may not report 'Entry.field'.
+ IDENTIFY_AS = {'Entry.field', 'textarea'}
def setUp(self):
super().setUp()
self.entry.pack()
self.entry.update()
- # bpo-27313: macOS Cocoa widget differs from X, allow either
- self.assertEqual(self.entry.identify(5, 5), self.IDENTIFY_AS)
+ self.assertIn(self.entry.identify(5, 5), self.IDENTIFY_AS)
self.assertEqual(self.entry.identify(-1, -1), "")
self.assertRaises(tkinter.TclError, self.entry.identify, None, 5)
'validate', 'validatecommand', 'values',
'width', 'xscrollcommand',
)
- IDENTIFY_AS = 'Combobox.button' if sys.platform == 'darwin' else 'textarea'
+ IDENTIFY_AS = {'Combobox.button', 'textarea'}
def setUp(self):
super().setUp()
'takefocus', 'textvariable', 'to', 'validate', 'validatecommand',
'values', 'width', 'wrap', 'xscrollcommand',
)
- IDENTIFY_AS = 'Spinbox.field' if sys.platform == 'darwin' else 'textarea'
+ IDENTIFY_AS = {'Spinbox.field', 'textarea'}
def setUp(self):
super().setUp()