mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
Issue #20072: Fixed multiple errors in tkinter with wantobjects is False.
* Misc.image_names(), Misc.image_types(), Wm.wm_colormapwindows(), and LabelFrame.panes() now always return a tuple. * Fixed error of comparing str and int in tt.LabeledScale._adjust(). * ttk.Notebook.index() now always returns int. * ttk.Notebook.tabs() now always returns a tuple. * ttk.Entry.bbox() now always returns a tuple of ints. * ttk.Entry.validate() now always correctly works. * ttk.Combobox.current() now always returns int. * ttk.Panedwindow.sashpos() now always returns int. * ttk.Treeview.bbox() now always returns a tuple of ints. * ttk.Treeview.get_children() now always returns a tuple. * ttk.Treeview.exists() now always correctly works. * ttk.Treeview.index() now always returns int. * ttk.Treeview.tag_has() now always returns 0 or 1. * And numerous other errors in methods which returns a tuple, list or dict. * Fixed ttk tests for wantobjects is False.
This commit is contained in:
parent
0455c3fd28
commit
a21acb5d95
7 changed files with 153 additions and 71 deletions
|
|
@ -393,8 +393,10 @@ def test_list_from_layouttuple(self):
|
|||
('name', 'no_minus', 'value'))
|
||||
self.assertRaises(ValueError, ttk._list_from_layouttuple,
|
||||
('something', '-children')) # no children
|
||||
self.assertRaises(ValueError, ttk._list_from_layouttuple,
|
||||
('something', '-children', 'value')) # invalid children
|
||||
import tkinter
|
||||
if not tkinter._default_root or tkinter._default_root.wantobjects():
|
||||
self.assertRaises(ValueError, ttk._list_from_layouttuple,
|
||||
('something', '-children', 'value')) # invalid children
|
||||
|
||||
|
||||
def test_val_or_dict(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue