Visitar URL original
test_ttk_guionly test failures on macOS with Tcl/Tk 8.6.10 · Issue #86673 · python/cpython · GitHub
The Wayback Machine - https://web.archive.org/web/20230217045845/https://github.com/python/cpython/issues/86673
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

test_ttk_guionly test failures on macOS with Tcl/Tk 8.6.10 #86673

Open
ned-deily opened this issue Nov 30, 2020 · 15 comments
Open

test_ttk_guionly test failures on macOS with Tcl/Tk 8.6.10 #86673

ned-deily opened this issue Nov 30, 2020 · 15 comments

Comments

@ned-deily
Copy link
Member

BPO 42507
Nosy @terryjreedy, @ronaldoussoren, @vstinner, @ned-deily, @serhiy-storchaka

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2020-11-30.02:46:40.854>
labels = ['OS-mac', '3.8', 'expert-tkinter', '3.9', '3.10']
title = 'test_ttk_guionly test failures on macOS with Tcl/Tk 8.6.10'
updated_at = <Date 2021-01-27.11:55:43.827>
user = 'https://github.com/ned-deily'

bugs.python.org fields:

activity = <Date 2021-01-27.11:55:43.827>
actor = 'vstinner'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['macOS', 'Tkinter']
creation = <Date 2020-11-30.02:46:40.854>
creator = 'ned.deily'
dependencies = []
files = []
hgrepos = []
issue_num = 42507
keywords = []
message_count = 12.0
messages = ['382109', '382121', '382175', '382206', '382296', '382328', '382364', '382428', '382441', '382446', '382447', '385764']
nosy_count = 5.0
nosy_names = ['terry.reedy', 'ronaldoussoren', 'vstinner', 'ned.deily', 'serhiy.storchaka']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = None
url = 'https://bugs.python.org/issue42507'
versions = ['Python 3.8', 'Python 3.9', 'Python 3.10']

@ned-deily
Copy link
Member Author

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/

@serhiy-storchaka
Copy link
Member

Try to test with 6cc2c41 (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.

@ned-deily
Copy link
Member Author

I tested on 3.9 with the backport of #67662 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

@serhiy-storchaka
Copy link
Member

I have no ideas. Try to add more calls of update() in these tests.

@serhiy-storchaka
Copy link
Member

Can I get a remote access to machine with macOS?

@terryjreedy
Copy link
Member

It might be the tk/tkinter build, not the tests, that is at fault. That is my current conclusion for bpo-42508 (regarding IDLE as a test).

@ned-deily
Copy link
Member Author

Terry:

It might be the tk/tkinter build, not the tests, that is at fault.

Can you elaborate?

@terryjreedy
Copy link
Member

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.

@ned-deily
Copy link
Member Author

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?

@serhiy-storchaka
Copy link
Member

All these failures point not on some details of appearance, but that the widget is not rendered at all.

@ronaldoussoren
Copy link
Contributor

I might be able to debug during the weekend, but my main focus will be on back porting the changes in bpo-41100 to the 3.8 branch (or at least parts of it).

@vstinner
Copy link
Member

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

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
@erlend-aasland
Copy link
Contributor

FWIW, I'm unable to reproduce on Python 3.9 through 3.11 (python.org binarier). I can reproduce with Homebrew supplied Python 3.8, though.

@ronaldoussoren
Copy link
Contributor

What's the Tcl/Tk version for the homebrew installation? (python -m test.pythoninfo).

If that's an older version than 8.6.12 this could be a bug in Tcl/Tk.

@erlend-aasland
Copy link
Contributor

What's the Tcl/Tk version for the homebrew installation? (python -m test.pythoninfo).

If that's an older version than 8.6.12 this could be a bug in Tcl/Tk.

Same version as we supply:

$ python3.9 -m test.pythoninfo | grep tkinter
tkinter.TCL_VERSION: 8.6
tkinter.TK_VERSION: 8.6
tkinter.info_patchlevel: 8.6.12
$ python3.8 -m test.pythoninfo | grep tkinter
tkinter.TCL_VERSION: 8.6
tkinter.TK_VERSION: 8.6
tkinter.info_patchlevel: 8.6.12

FTR, ditto for 3.10 and 3.11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants