This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: test_ttk_guionly test failures on macOS with Tcl/Tk 8.6.10
Type: Stage:
Components: macOS, Tkinter Versions: Python 3.10, Python 3.9, Python 3.8
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: ned.deily, ronaldoussoren, serhiy.storchaka, terry.reedy, vstinner
Priority: normal Keywords:

Created on 2020-11-30 02:46 by ned.deily, last changed 2022-04-11 14:59 by admin.

Messages (12)
msg382109 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2020-11-30 02:46
As of 3.9.1rc1 (and coming soon to 3.10.x and 3.8.x), we now provide a new additional macOS universal2 installer variant that, for various reasons, provides a built-in version of Tcl/Tk 8.6.10, instead of 8.6.8 as has been provided with the 10.9 installer variant.  Using 8.6.10 on nacOS, six test_ttk_guionly tests fail while passing using 8.6.8 ib nacOS. Similar results were obtained when running the tests on either macOS 10.15.7 or 11.0.1. The failures:

======================================================================
FAIL: test_identify (tkinter.test.test_ttk.test_widgets.ComboboxTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/tkinter/test/test_ttk/test_widgets.py", line 334, in test_identify
    self.assertIn(self.entry.identify(5, 5),
AssertionError: '' not found in ('textarea', 'Combobox.button')

======================================================================
FAIL: test_identify (tkinter.test.test_ttk.test_widgets.EntryTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/tkinter/test/test_ttk/test_widgets.py", line 334, in test_identify
    self.assertIn(self.entry.identify(5, 5),
AssertionError: '' not found in ('textarea', 'Combobox.button')

======================================================================
FAIL: test_command (tkinter.test.test_ttk.test_widgets.SpinboxTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/tkinter/test/test_ttk/test_widgets.py", line 1155, in test_command
    self.assertTrue(success)
AssertionError: [] is not true

======================================================================
FAIL: test_identify (tkinter.test.test_ttk.test_widgets.SpinboxTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/tkinter/test/test_ttk/test_widgets.py", line 334, in test_identify
    self.assertIn(self.entry.identify(5, 5),
AssertionError: 'Spinbox.field' not found in ('textarea', 'Combobox.button')

======================================================================
FAIL: test_bbox (tkinter.test.test_ttk.test_widgets.TreeviewTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/tkinter/test/test_ttk/test_widgets.py", line 1353, in test_bbox
    self.assertIsBoundingBox(bbox)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/tkinter/test/widget_tests.py", line 197, in assertIsBoundingBox
    self.assertIsInstance(bbox, tuple)
AssertionError: '' is not an instance of <class 'tuple'>

======================================================================
FAIL: test_identify (tkinter.test.test_ttk.test_widgets.WidgetTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/tkinter/test/test_ttk/test_widgets.py", line 68, in test_identify
    self.assertEqual(self.widget.identify(
AssertionError: '' != 'label'
+ label


https://www.python.org/downloads/release/python-391rc1/
msg382121 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-11-30 08:34
Try to test with 6cc2c419f6cf5ed336609ba01055e77d7c553e6d (PR-23474). All of failing tests were modified to make them passing on Windows, so I expect that this can help on macOS too (in most cases). If it does not help I will propose other changes for testing.
msg382175 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2020-11-30 19:07
I tested on 3.9 with the backport of GH-23474 merged. The six failures are still there plus there is now an additional failure:

======================================================================
FAIL: test_horizontal_range (tkinter.test.test_ttk.test_extensions.LabeledScaleTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/tkinter/test/test_ttk/test_extensions.py", line 121, in test_horizontal_range
    self.assertEqual(prev_xcoord, int(linfo_1['x']))
AssertionError: 12 != 0
msg382206 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-11-30 22:59
I have no ideas. Try to add more calls of update() in these tests.
msg382296 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-12-02 06:31
Can I get a remote access to machine with macOS?
msg382328 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-12-02 17:16
It might be the tk/tkinter build, not the tests, that is at fault.  That is my current conclusion for #42508 (regarding IDLE as a test).
msg382364 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2020-12-03 01:20
Terry:
> It might be the tk/tkinter build, not the tests, that is at fault.

Can you elaborate?
msg382428 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-12-03 16:40
The test may be correctly detecting a change in widget behavior.  This is less surprising to me than some keypresses acting like two keypresses a millesecond apart.
msg382441 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2020-12-03 19:05
OK, thanks for the clarification, Terry. Considering that our tkinter tests make assumptions about the underlying Tk widgets behavior, assumptions not necessarily shared by the Tk developers :), these kind of version-dependent failures are a risk of and shortcoming of having extensive tests like these. I'm not overly concerned about the failures other than it is not good to have failing tests.

Serihy: "Can I get a remote access to machine with macOS?" Sorry, that's difficult for me to provide right now; perhaps later.  Anyone else?
msg382446 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-12-03 19:46
All these failures point not on some details of appearance, but that the widget is not rendered at all.
msg382447 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2020-12-03 20:12
I might be able to debug during the weekend, but my main focus will be on back porting the changes in #41100 to the 3.8 branch (or at least parts of it).
msg385764 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-01-27 11:55
Failure on the Ubuntu job run on my PR 24353:

https://github.com/python/cpython/pull/24353/checks?check_run_id=1776422914

======================================================================
FAIL: test_identify (tkinter.test.test_ttk.test_widgets.ComboboxTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/cpython/cpython/Lib/tkinter/test/test_ttk/test_widgets.py", line 335, in test_identify
    self.assertEqual(self.entry.identify(5, 5), "textarea")
AssertionError: '' != 'textarea'
+ textarea
History
Date User Action Args
2022-04-11 14:59:38adminsetgithub: 86673
2021-01-27 11:55:43vstinnersetnosy: + vstinner
messages: + msg385764
2020-12-03 20:12:27ronaldoussorensetmessages: + msg382447
2020-12-03 19:46:27serhiy.storchakasetmessages: + msg382446
2020-12-03 19:05:16ned.deilysetmessages: + msg382441
2020-12-03 16:40:25terry.reedysetmessages: + msg382428
2020-12-03 01:20:08ned.deilysetmessages: + msg382364
2020-12-02 17:16:34terry.reedysetnosy: + terry.reedy
messages: + msg382328
2020-12-02 06:31:31serhiy.storchakasetmessages: + msg382296
2020-11-30 22:59:55serhiy.storchakasetmessages: + msg382206
2020-11-30 19:07:24ned.deilysetmessages: + msg382175
2020-11-30 08:34:23serhiy.storchakasetmessages: + msg382121
2020-11-30 02:47:05ned.deilysetnosy: + serhiy.storchaka
2020-11-30 02:46:40ned.deilycreate