Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.12] gh-86673: Loosen test_ttk.test_identify() requirements (GH-125335) #125391

Merged
merged 1 commit into from
Oct 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Lib/test/test_ttk/test_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,8 @@ class EntryTest(AbstractWidgetTest, unittest.TestCase):
'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()
Expand Down Expand Up @@ -373,8 +374,7 @@ def test_identify(self):
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)
Expand Down Expand Up @@ -461,7 +461,7 @@ class ComboboxTest(EntryTest, unittest.TestCase):
'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()
Expand Down Expand Up @@ -1204,7 +1204,7 @@ class SpinboxTest(EntryTest, unittest.TestCase):
'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()
Expand Down
Loading