-
-
Notifications
You must be signed in to change notification settings - Fork 34.7k
Improve test coverage of tkinter #151678
Copy link
Copy link
Open
Labels
3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixes3.15pre-release feature fixes, bugs and security fixespre-release feature fixes, bugs and security fixes3.16new features, bugs and security fixesnew features, bugs and security fixestestsTests in the Lib/test dirTests in the Lib/test dir
Metadata
Metadata
Assignees
Labels
3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixes3.15pre-release feature fixes, bugs and security fixespre-release feature fixes, bugs and security fixes3.16new features, bugs and security fixesnew features, bugs and security fixestestsTests in the Lib/test dirTests in the Lib/test dir
Fields
Give feedbackNo fields configured for issues without a type.
Feature or enhancement
Large parts of the :mod:
tkinterpublic API have little or no direct testcoverage. Widget configuration options are tested fairly thoroughly via the
AbstractWidgetTestframework inLib/test/test_tkinter/test_widgets.py,but many widget methods and the per-element configuration surfaces (tags,
embedded images and windows, marks, etc.) are not exercised at all.
For example, before this issue
test_text.pytested only a handful ofTextmethods (debug,search,search_all,count), leavingindices, content manipulation, marks, tags, undo/redo, dump, embedded images
and windows, peers, geometry and the tag/image/window configuration options
untested.
The goal is to incrementally add tests for the untested tkinter API, widget by
widget and method by method:
Text— methods and tag/image/window option configuration (in progress).Canvas— items, tags, coords, scanning, postscript, and item options.Listbox,Entry,Spinbox,Menu— selection, indices, item options.Misc/Wm— window manager, clipboard, selection, grab, event andwinfomethods.pack/place/grid) query methods.ttkwidgets,Style,Treeview.This complements the related audit of Tk commands that are only partially
wrapped by tkinter.
Links to previous discussion
Related to the recent tkinter documentation overhaul (gh-86726).
Linked PRs