Title: Improve test coverage of tkinter · Issue #151678 · python/cpython · GitHub
Open Graph Title: Improve test coverage of tkinter · Issue #151678 · python/cpython
X Title: Improve test coverage of tkinter · Issue #151678 · python/cpython
Description: 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_widget...
Open Graph Description: 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 framew...
X Description: 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 framew...
Opengraph URL: https://github.com/python/cpython/issues/151678
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Improve test coverage of tkinter","articleBody":"### Feature or enhancement\n\nLarge 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.\n\nFor 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.\n\nThe goal is to incrementally add tests for the untested tkinter API, widget by widget and method by method:\n\n* `Text` — methods and tag/image/window option configuration (in progress).\n* `Canvas` — items, tags, coords, scanning, postscript, and item options.\n* `Listbox`, `Entry`, `Spinbox`, `Menu` — selection, indices, item options.\n* `Misc`/`Wm` — window manager, clipboard, selection, grab, event and ``winfo`` methods.\n* Geometry managers (``pack``/``place``/``grid``) query methods.\n* `ttk` widgets, ``Style``, ``Treeview``.\n\nThis complements the related audit of Tk commands that are only partially wrapped by tkinter.\n\n### Links to previous discussion\n\nRelated to the recent tkinter documentation overhaul (gh-86726).\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-151681\n* gh-151683\n* gh-151685\n* gh-151686\n* gh-151687\n* gh-151702\n* gh-151705\n* gh-151709\n* gh-151710\n* gh-151711\n* gh-151712\n* gh-151713\n* gh-151714\n* gh-151715\n* gh-151716\n* gh-151717\n* gh-151718\n* gh-151725\n* gh-151726\n* gh-151727\n* gh-151732\n* gh-151736\n* gh-151737\n* gh-151738\n* gh-151739\n* gh-151741\n* gh-151742\n* gh-151743\n* gh-151751\n* gh-151753\n* gh-151754\n* gh-151755\n* gh-151756\n* gh-151759\n* gh-151760\n* gh-151761\n* gh-151780\n* gh-151781\n* gh-151782\n* gh-151790\n* gh-151791\n* gh-151792\n* gh-151793\n* gh-151794\n* gh-151795\n* gh-151796\n* gh-151797\n* gh-151799\n* gh-151800\n* gh-151801\n* gh-151802\n* gh-151803\n* gh-151804\n* gh-151805\n* gh-151806\n* gh-151807\n* gh-151856\n* gh-151859\n* gh-151860\n* gh-151869\n* gh-151960\n* gh-151963\n* gh-151964\n* gh-151965\n* gh-152362\n* gh-152367\n* gh-152368\n* gh-152369\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/serhiy-storchaka","@type":"Person","name":"serhiy-storchaka"},"datePublished":"2026-06-18T22:08:22.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/151678/cpython/issues/151678"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:43db427c-e15c-88e6-b135-81a1511f3056 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C9BC:1C3DD7:192D8EB:2198C12:6A52C2FE |
| html-safe-nonce | 01a2b5c21b74b16e44520fafdb857293a67966168832106dd00801b85fdb1775 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOUJDOjFDM0RENzoxOTJEOEVCOjIxOThDMTI6NkE1MkMyRkUiLCJ2aXNpdG9yX2lkIjoiNTAwNDA4MTMzNjI0OTY2NDI1NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 251387d9a37b74b80977eabd9fa15ae344561be2d46320b43abbf5b15e162d95 |
| hovercard-subject-tag | issue:4696292690 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/151678/issue_layout |
| twitter:image | https://opengraph.githubassets.com/861af572725900757f378be847bcb39641e16c304aad97175b0fc8543a88869f/python/cpython/issues/151678 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/861af572725900757f378be847bcb39641e16c304aad97175b0fc8543a88869f/python/cpython/issues/151678 |
| og:image:alt | 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 framew... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | serhiy-storchaka |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width