Feature or enhancement
Large parts of the :mod:tkinter public API have little or no direct test coverage. Widget configuration options are tested fairly thoroughly via the AbstractWidgetTest framework in Lib/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.py tested only a handful of Text methods (debug, search, search_all, count), leaving indices, 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 and winfo methods.
Geometry managers (pack/place/grid) query methods.
ttk widgets, 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
gh-151678: Add tests for tkinter.Text #151681
gh-151678: Add tests for tkinter.Canvas #151683
gh-151678: Add tests for tkinter.Menu #151685
gh-151678: Add tests for tkinter.Listbox #151686
gh-151678: Add tests for the remaining tkinter widgets #151687
[3.15] gh-151678: Add tests for tkinter.Text (GH-151681) #151702
[3.14] gh-151678: Add tests for tkinter.Text (GH-151681) #151705
[3.15] gh-151678: Add tests for tkinter.Menu (GH-151685) #151709
[3.14] gh-151678: Add tests for tkinter.Menu (GH-151685) #151710
[3.13] gh-151678: Add tests for tkinter.Menu (GH-151685) #151711
[3.15] gh-151678: Add tests for tkinter.Listbox (GH-151686) #151712
[3.14] gh-151678: Add tests for tkinter.Listbox (GH-151686) #151713
[3.13] gh-151678: Add tests for tkinter.Listbox (GH-151686) #151714
[3.13] gh-151678: Add tests for tkinter.Text (GH-151681) (GH-151705) #151715
[3.15] gh-151678: Add tests for tkinter.Canvas (GH-151683) #151716
[3.14] gh-151678: Add tests for tkinter.Canvas (GH-151683) #151717
[3.13] gh-151678: Add tests for tkinter.Canvas (GH-151683) #151718
[3.15] gh-151678: Add tests for the remaining tkinter widgets (GH-151687) #151725
[3.14] gh-151678: Add tests for the remaining tkinter widgets (GH-151687) #151726
[3.13] gh-151678: Add tests for the remaining tkinter widgets (GH-151687) #151727
gh-151678: Add tests for tkinter Misc, Wm and geometry manager methods #151732
gh-151678: Add tests for tkinter.ttk methods #151736
[3.15] gh-151678: Add tests for tkinter Misc, Wm and geometry manager methods (GH-151732) #151737
[3.14] gh-151678: Add tests for tkinter Misc, Wm and geometry manager methods (GH-151732) #151738
[3.13] gh-151678: Add tests for tkinter Misc, Wm and geometry manager methods (GH-151732) #151739
[3.15] gh-151678: Add tests for tkinter.ttk methods (GH-151736) #151741
[3.14] gh-151678: Add tests for tkinter.ttk methods (GH-151736) #151742
[3.13] gh-151678: Add tests for tkinter.ttk methods (GH-151736) #151743
gh-151678: Add tests for tkinter font, image, variable, Misc and Wm methods #151751
gh-151678: Add tests for tkinter.scrolledtext #151753
[3.15] gh-151678: Add tests for tkinter font, image, variable, Misc and Wm methods (GH-151751) #151754
[3.14] gh-151678: Add tests for tkinter font, image, variable, Misc and Wm methods (GH-151751) #151755
[3.13] gh-151678: Add tests for tkinter font, image, variable, Misc and Wm methods (GH-151751) #151756
[3.15] gh-151678: Add tests for tkinter.scrolledtext (GH-151753) #151759
[3.14] gh-151678: Add tests for tkinter.scrolledtext (GH-151753) #151760
[3.13] gh-151678: Add tests for tkinter.scrolledtext (GH-151753) #151761
gh-151678: Add tests for tkinter.dnd #151780
gh-151678: Add tests for tkinter.filedialog #151781
gh-151678: Add tests for the remaining tkinter Misc, Wm and Text methods #151782
[3.15] gh-151678: Add tests for tkinter.dnd (GH-151780) #151790
[3.14] gh-151678: Add tests for tkinter.dnd (GH-151780) #151791
[3.13] gh-151678: Add tests for tkinter.dnd (GH-151780) #151792
gh-151678: Add tests for tkinter widget virtual events #151793
gh-151678: Add interactive tests for tkinter.simpledialog #151794
[3.15] gh-151678: Add tests for tkinter.filedialog (GH-151781) #151795
[3.14] gh-151678: Add tests for tkinter.filedialog (GH-151781) #151796
[3.13] gh-151678: Add tests for tkinter.filedialog (GH-151781) #151797
[3.15] gh-151678: Add tests for the remaining tkinter Misc, Wm and Text methods (GH-151782) #151799
[3.14] gh-151678: Add tests for the remaining tkinter Misc, Wm and Text methods (GH-151782) #151800
[3.13] gh-151678: Add tests for the remaining tkinter Misc, Wm and Text methods (GH-151782) #151801
[3.15] gh-151678: Add interactive tests for tkinter.simpledialog (GH-151794) #151802
[3.14] gh-151678: Add interactive tests for tkinter.simpledialog (GH-151794) #151803
[3.13] gh-151678: Add interactive tests for tkinter.simpledialog (GH-151794) #151804
[3.15] gh-151678: Add tests for tkinter widget virtual events (GH-151793) #151805
[3.14] gh-151678: Add tests for tkinter widget virtual events (GH-151793) #151806
[3.13] gh-151678: Add tests for tkinter widget virtual events (GH-151793) #151807
Feature or enhancement
Large parts of the :mod:
tkinterpublic API have little or no direct test coverage. Widget configuration options are tested fairly thoroughly via theAbstractWidgetTestframework 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), leaving indices, 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