GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Improve test coverage of tkinter · Issue #151678 · python/cpython

Improve test coverage of tkinter #151678

New issue
Copy link
New issue
Copy link
Closed
Closed
Improve test coverage of tkinter#151678
Copy link
Assignees
serhiy-storchaka
Labels
3.13only security fixesonly security fixes3.14bugs and security fixesbugs and security fixes3.15bugs and security fixesbugs and security fixes3.16new features, bugs and security fixesnew features, bugs and security fixestestsTests in the Lib/test dirTests in the Lib/test dirtopic-tkinter

Description

@serhiy-storchaka
serhiy-storchaka
opened on Jun 18, 2026
Issue body actions

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
  • gh-151678: Add tests for tkinter.simpledialog #151856
  • [3.14] gh-151678: Add tests for tkinter.simpledialog (GH-151856) #151859
  • [3.13] gh-151678: Add tests for tkinter.simpledialog (GH-151856) #151860
  • [3.15] gh-151678: Add tests for tkinter.simpledialog (GH-151856) #151869
  • gh-151678: Add tests for ttk Menubutton and OptionMenu widget options #151960
  • [3.15] gh-151678: Add tests for ttk Menubutton and OptionMenu widget options (GH-151960) #151963
  • [3.14] gh-151678: Add tests for ttk Menubutton and OptionMenu widget options (GH-151960) #151964
  • [3.13] gh-151678: Add tests for ttk Menubutton and OptionMenu widget options (GH-151960) #151965
  • gh-151678: Add more tests for tkinter.dnd #152362
  • [3.15] gh-151678: Add more tests for tkinter.dnd (GH-152362) #152367
  • [3.14] gh-151678: Add more tests for tkinter.dnd (GH-152362) #152368
  • [3.13] gh-151678: Add more tests for tkinter.dnd (GH-152362) #152369

Activity

Next
  1. serhiy-storchaka
    self-assigned this
    on Jun 18, 2026
  2. serhiy-storchaka
    added
    testsTests in the Lib/test dirTests in the Lib/test dir
    3.13only security fixesonly security fixes
    3.14bugs and security fixesbugs and security fixes
    3.15bugs and security fixesbugs and security fixes
    3.16new features, bugs and security fixesnew features, bugs and security fixes
    on Jun 18, 2026
  3. serhiy-storchaka
    added 2 commits that reference this issue on Jun 18, 2026

    pythongh-151678: Add tests for tkinter.Canvas

    3cd6b95

    pythongh-151678: Add tests for tkinter.Menu

    f9c55d8
  4. aisk
    added
    topic-tkinter
    on Jun 19, 2026
  5. serhiy-storchaka
    added 6 commits that reference this issue on Jun 19, 2026

    pythongh-151678: Add tests for tkinter.Menu

    4714219

    pythongh-151678: Add tests for tkinter.Listbox

    698eb6b

    pythongh-151678: Add tests for the remaining tkinter widgets

    602959c

    pythongh-151678: Skip the bad-bitmap check for Canvas on Aqua

    4cd2c02

    gh-151678: Add tests for tkinter.Text (GH-151681)

    4ac809e

    gh-151678: Add tests for tkinter.Menu (GH-151685)

    ef5c32a
  6. 73 remaining items

  7. pyctrl
    added 15 commits that reference this issue on Jul 5, 2026

    pythongh-151678: Add tests for tkinter.Menu (pythonGH-151685)

    de60540

    pythongh-151678: Add tests for tkinter.Listbox (pythonGH-151686)

    5357a4b

    pythongh-151678: Add tests for tkinter.Canvas (pythonGH-151683)

    5ef9847

    pythongh-151678: Add tests for the remaining tkinter widgets (pythonG…

    1e841f7

    pythongh-151678: Add tests for tkinter Misc, Wm and geometry manager …

    8058cd4

    pythongh-151678: Add tests for tkinter.ttk methods (pythonGH-151736)

    8c92884

    pythongh-151678: Add tests for tkinter font, image, variable, Misc an…

    35486b9

    pythongh-151678: Add tests for tkinter.scrolledtext (pythonGH-151753)

    082cb0c

    pythongh-151678: Add tests for tkinter.dnd (pythonGH-151780)

    1262e4e

    pythongh-151678: Add tests for tkinter.filedialog (pythonGH-151781)

    4c52053

    pythongh-151678: Add tests for the remaining tkinter Misc, Wm and Tex…

    c28ee2e

    pythongh-151678: Add interactive tests for tkinter.simpledialog (pyth…

    9201e1d

    pythongh-151678: Add tests for tkinter widget virtual events (pythonG…

    b4fcbc9

    pythongh-151678: Add tests for tkinter.simpledialog (pythonGH-151856)

    b4e9d8b

    pythongh-151678: Add tests for ttk Menubutton and OptionMenu widget o…

    5a23836
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @serhiy-storchaka
    serhiy-storchaka

Labels

3.13only security fixesonly security fixes3.14bugs and security fixesbugs and security fixes3.15bugs and security fixesbugs and security fixes3.16new features, bugs and security fixesnew features, bugs and security fixestestsTests in the Lib/test dirTests in the Lib/test dirtopic-tkinter

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.