classification
Title: test case failures in test_widgets.ComboboxTest.of test_ttk_guionly on OS X with Cocoa Tk 8.5.18
Type: Stage: resolved
Components: Tests, Tkinter Versions: Python 3.8, Python 3.7, Python 3.6, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: miss-islington, ned.deily, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2016-06-14 01:06 by ned.deily, last changed 2019-02-24 08:40 by ned.deily. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 12011 merged ned.deily, 2019-02-24 07:04
PR 12012 merged miss-islington, 2019-02-24 07:28
PR 12013 merged miss-islington, 2019-02-24 07:28
PR 12015 merged ned.deily, 2019-02-24 08:22
Messages (12)
msg268494 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2016-06-14 01:06
On 3.6.0a2, 3.5.2rc1, and 2.7.12rc1:

======================================================================
FAIL: test_identify (tkinter.test.test_ttk.test_widgets.ComboboxTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/tkinter/test/test_ttk/test_widgets.py", line 332, in test_identify
    self.assertEqual(self.entry.identify(5, 5), "textarea")
AssertionError: 'Combobox.button' != 'textarea'
- Combobox.button
+ textarea

On 3.6.0a2 and 3.5.2rc1:

======================================================================
FAIL: test_virtual_event (tkinter.test.test_ttk.test_widgets.ComboboxTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/tkinter/test/test_ttk/test_widgets.py", line 455, in test_virtual_event
    self.assertTrue(success)
AssertionError: [] is not true

----------------------------------------------------------------------
msg268513 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-06-14 04:35
These tests are not new. Are failures stable? What version of Tk is used?
msg268515 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-06-14 04:36
Ah, sorry, I missed the version in the title.
msg268520 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2016-06-14 05:00
For example, the tests pass in 3.5.1 but fail in 3.5.2rc1.  I see that the changesets associated with Issue26177 altered them.
msg268531 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-06-14 06:58
Are there failures if run tests separately?

$ ./python -m test -vu gui -m test_identify test_ttk_guionly

If no, could you please find a test running before test_identify or test_virtual_event that provokes a failure?

I can't reproduce failures on Linux. Needed help of Mac user for investigating this issue.
msg268535 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2016-06-14 07:12
test_ttk_guionly runs test_identify, doesn't it?  (I'll try to take a look at it later when I have more time.)

$ /usr/local/bin/python3.5 -m test -vu gui test_ttk_guionly
== CPython 3.5.2rc1 (v3.5.2rc1:68feec6488b2, Jun 11 2016, 21:59:53) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]
==   Darwin-15.5.0-x86_64-i386-64bit little-endian
==   hash algorithm: siphash24 64bit
Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0)
[1/1] test_ttk_guionly
test_horizontal_range (tkinter.test.test_ttk.test_extensions.LabeledScaleTest) ... ok
test_initialization (tkinter.test.test_ttk.test_extensions.LabeledScaleTest) ... ok
test_initialization_no_master (tkinter.test.test_ttk.test_extensions.LabeledScaleTest) ... ok
test_resize (tkinter.test.test_ttk.test_extensions.LabeledScaleTest) ... ok
test_variable_change (tkinter.test.test_ttk.test_extensions.LabeledScaleTest) ... ok
test_widget_destroy (tkinter.test.test_ttk.test_extensions.LabeledScaleTest) ... ok
test_initialization (tkinter.test.test_ttk.test_extensions.OptionMenuTest) ... ok
test_menu (tkinter.test.test_ttk.test_extensions.OptionMenuTest) ... ok
test_widget_destroy (tkinter.test.test_ttk.test_extensions.OptionMenuTest) ... ok
test_configure (tkinter.test.test_ttk.test_style.StyleTest) ... ok
test_layout (tkinter.test.test_ttk.test_style.StyleTest) ... ok
test_lookup (tkinter.test.test_ttk.test_style.StyleTest) ... ok
test_map (tkinter.test.test_ttk.test_style.StyleTest) ... ok
test_theme_use (tkinter.test.test_ttk.test_style.StyleTest) ... ok
patchlevel = 8.5.18
[...]
test_foreground (tkinter.test.test_ttk.test_widgets.ComboboxTest) ... ok
test_height (tkinter.test.test_ttk.test_widgets.ComboboxTest) ... ok
test_identify (tkinter.test.test_ttk.test_widgets.ComboboxTest) ... FAIL
test_invalidcommand (tkinter.test.test_ttk.test_widgets.ComboboxTest) ... ok
test_justify (tkinter.test.test_ttk.test_widgets.ComboboxTest) ... ok
test_keys (tkinter.test.test_ttk.test_widgets.ComboboxTest) ... ok
test_postcommand (tkinter.test.test_ttk.test_widgets.ComboboxTest) ... ok
[...]
test_validatecommand (tkinter.test.test_ttk.test_widgets.ComboboxTest) ... ok
test_validation (tkinter.test.test_ttk.test_widgets.ComboboxTest) ... ok
test_validation_options (tkinter.test.test_ttk.test_widgets.ComboboxTest) ... ok
test_values (tkinter.test.test_ttk.test_widgets.ComboboxTest) ... ok
test_virtual_event (tkinter.test.test_ttk.test_widgets.ComboboxTest) ... FAIL
test_width (tkinter.test.test_ttk.test_widgets.ComboboxTest) ... ok
test_xscrollcommand (tkinter.test.test_ttk.test_widgets.ComboboxTest) ... ok
test_background (tkinter.test.test_ttk.test_widgets.EntryTest) ... ok
[...]
test_identify (tkinter.test.test_ttk.test_widgets.WidgetTest) ... ok
test_widget_state (tkinter.test.test_ttk.test_widgets.WidgetTest) ... ok

======================================================================
FAIL: test_identify (tkinter.test.test_ttk.test_widgets.ComboboxTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/tkinter/test/test_ttk/test_widgets.py", line 332, in test_identify
    self.assertEqual(self.entry.identify(5, 5), "textarea")
AssertionError: 'Combobox.button' != 'textarea'
- Combobox.button
+ textarea


======================================================================
FAIL: test_virtual_event (tkinter.test.test_ttk.test_widgets.ComboboxTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/tkinter/test/test_ttk/test_widgets.py", line 455, in test_virtual_event
    self.assertTrue(success)
AssertionError: [] is not true

----------------------------------------------------------------------
Ran 271 tests in 3.242s

FAILED (failures=2, skipped=11)
test test_ttk_guionly failed
1 test failed:
    test_ttk_guionly
msg313016 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2018-02-27 18:56
With a current Tk 8.6.8, test_virtual_event no longer fails (still does with 8.5.18) but test_identify still fails as it does with 8.5.
msg336443 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2019-02-24 07:28
New changeset aeca373b339e0ea9739536ce6b43bd90f3b89873 by Ned Deily in branch 'master':
bpo-27313: Avoid test_ttk_guionly ComboboxTest fail with macOS Cocoa Tk (GH-12011)
https://github.com/python/cpython/commit/aeca373b339e0ea9739536ce6b43bd90f3b89873
msg336444 - (view) Author: miss-islington (miss-islington) Date: 2019-02-24 07:46
New changeset 25d20a6503f3cd4ff8cf0e8ee33eea2b1daa77a8 by Miss Islington (bot) in branch '3.7':
bpo-27313: Avoid test_ttk_guionly ComboboxTest fail with macOS Cocoa Tk (GH-12011)
https://github.com/python/cpython/commit/25d20a6503f3cd4ff8cf0e8ee33eea2b1daa77a8
msg336445 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2019-02-24 07:56
New changeset 1dee4565fae9ccb54719fa99d7944c148736083a by Ned Deily (Miss Islington (bot)) in branch '3.6':
bpo-27313: Avoid test_ttk_guionly ComboboxTest fail with macOS Cocoa Tk (GH-12011) (GH-12013)
https://github.com/python/cpython/commit/1dee4565fae9ccb54719fa99d7944c148736083a
msg336449 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2019-02-24 08:33
New changeset b5213f4def07107952ce422ecc9d8508f4f084b4 by Ned Deily in branch '2.7':
[2.7] bpo-27313: Avoid test_ttk_guionly ComboboxTest fail with macOS Cocoa Tk (GH-12015)
https://github.com/python/cpython/commit/b5213f4def07107952ce422ecc9d8508f4f084b4
msg336450 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2019-02-24 08:40
macOS Cocoa Tk returns an identity of 'Combobox.button' for the created Combobox widget at the tested location whereas the X-based Tk's (including the macOS X version) returns 'textarea'.  Rather than try to further modify the test code, I just modified the test case to pass with either value when running on macOS.
History
Date User Action Args
2019-02-24 08:40:52ned.deilysetstatus: open -> closed
resolution: fixed
messages: + msg336450

stage: patch review -> resolved
2019-02-24 08:33:22ned.deilysetmessages: + msg336449
2019-02-24 08:22:22ned.deilysetpull_requests: + pull_request12046
2019-02-24 07:56:15ned.deilysetmessages: + msg336445
2019-02-24 07:46:23miss-islingtonsetnosy: + miss-islington
messages: + msg336444
2019-02-24 07:28:52miss-islingtonsetpull_requests: + pull_request12044
2019-02-24 07:28:42miss-islingtonsetpull_requests: + pull_request12043
2019-02-24 07:28:32ned.deilysetmessages: + msg336443
2019-02-24 07:04:35ned.deilysetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request12042
2018-02-27 18:56:35ned.deilysetmessages: + msg313016
versions: + Python 3.7, Python 3.8, - Python 3.5
2016-06-14 07:12:10ned.deilysetmessages: + msg268535
2016-06-14 06:58:41serhiy.storchakasetmessages: + msg268531
2016-06-14 05:00:26ned.deilysetmessages: + msg268520
2016-06-14 04:36:35serhiy.storchakasetmessages: + msg268515
2016-06-14 04:35:33serhiy.storchakasetmessages: + msg268513
2016-06-14 01:06:19ned.deilycreate