[Python-checkins] [2.7] bpo-27313: Avoid test_ttk_guionly ComboboxTest fail with macOS Cocoa Tk (GH-12015)
Ned Deily
webhook-mailer at python.org
Sun Feb 24 03:33:23 EST 2019
https://github.com/python/cpython/commit/b5213f4def07107952ce422ecc9d8508f4f084b4
commit: b5213f4def07107952ce422ecc9d8508f4f084b4
branch: 2.7
author: Ned Deily <nad at python.org>
committer: GitHub <noreply at github.com>
date: 2019-02-24T03:33:19-05:00
summary:
[2.7] bpo-27313: Avoid test_ttk_guionly ComboboxTest fail with macOS Cocoa Tk (GH-12015)
files:
A Misc/NEWS.d/next/Tests/2019-02-24-03-19-43.bpo-27313.Sj9veH.rst
M Lib/lib-tk/test/test_ttk/test_widgets.py
diff --git a/Lib/lib-tk/test/test_ttk/test_widgets.py b/Lib/lib-tk/test/test_ttk/test_widgets.py
index ec8899baac24..47cd7aff0e27 100644
--- a/Lib/lib-tk/test/test_ttk/test_widgets.py
+++ b/Lib/lib-tk/test/test_ttk/test_widgets.py
@@ -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)
diff --git a/Misc/NEWS.d/next/Tests/2019-02-24-03-19-43.bpo-27313.Sj9veH.rst b/Misc/NEWS.d/next/Tests/2019-02-24-03-19-43.bpo-27313.Sj9veH.rst
new file mode 100644
index 000000000000..189b9cf69f07
--- /dev/null
+++ b/Misc/NEWS.d/next/Tests/2019-02-24-03-19-43.bpo-27313.Sj9veH.rst
@@ -0,0 +1 @@
+Avoid test_ttk_guionly ComboboxTest failure with macOS Cocoa Tk.
More information about the Python-checkins
mailing list