Skip to content

Tkinter: test failure due to Tk 8.6.14 listbox bugfix #107262

Closed
@chrstphrchvz

Description

@chrstphrchvz

The current output of the itemconfigure command for listbox widgets falsely suggests that the configuration of listbox items is influenced by the options database (if I understand correctly). This will be fixed in Tk 8.6.14: see https://core.tcl-lang.org/tk/info/ed8eae599d76 and https://core.tcl-lang.org/tk/vdiff?from=edf00be1&to=025022a4

Although tkinter.Listbox.itemconfigure() will still work properly, test.test_tkinter.test_widgets.ListboxTest.test_itemconfigure will fail since it expects the erroneous output:

======================================================================
FAIL: test_itemconfigure (test.test_tkinter.test_widgets.ListboxTest.test_itemconfigure)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/user/git/cpython/Lib/test/test_tkinter/test_widgets.py", line 1002, in test_itemconfigure
    self.assertEqual(widget.itemconfigure(0, 'background'),
AssertionError: Tuples differ: ('background', '', '', '', 'red') != ('background', 'background', 'Background', '', 'red')

First differing element 1:
''
'background'

- ('background', '', '', '', 'red')
+ ('background', 'background', 'Background', '', 'red')

Linked PRs

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions