Skip to content

gh-151678: Add tests for tkinter.Menu#151685

Merged
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:test-tkinter-menu-methods
Jun 19, 2026
Merged

gh-151678: Add tests for tkinter.Menu#151685
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:test-tkinter-menu-methods

Conversation

@serhiy-storchaka

Copy link
Copy Markdown
Member

Cover previously-untested Menu methods in MenuTest:

  • adding and inserting items of every type (command, checkbutton, radiobutton, separator, cascade), with order and type verification;
  • deleting single items and ranges, including cleanup of the associated Tcl command;
  • index resolution (end, last, label, integer, active, none);
  • invoking command, checkbutton and radiobutton items;
  • entry xposition/yposition;
  • post/unpost/tk_popup mapping.

It also tests per-entry configuration options (accelerator, underline, state, colors, columnbreak, hidemargin, onvalue/offvalue, value, indicatoron) and the errors raised for invalid indices, entry types, option names and option values.

@bedevere-app bedevere-app Bot added tests Tests in the Lib/test dir awaiting core review labels Jun 19, 2026
@serhiy-storchaka serhiy-storchaka force-pushed the test-tkinter-menu-methods branch from 7b9a320 to f9c55d8 Compare June 19, 2026 00:08
Cover previously-untested Menu methods in MenuTest: adding, inserting and
deleting items of every type, index resolution, invoking items, entry x/y
positions, and post/unpost/tk_popup mapping.

Also test per-entry configuration options and the errors raised for
invalid indices, entry types, option names and option values.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@serhiy-storchaka serhiy-storchaka force-pushed the test-tkinter-menu-methods branch from f9c55d8 to 4714219 Compare June 19, 2026 08:08
@serhiy-storchaka serhiy-storchaka added skip news needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Jun 19, 2026
@serhiy-storchaka serhiy-storchaka merged commit ef5c32a into python:main Jun 19, 2026
56 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15.
🐍🍒⛏🤖

@serhiy-storchaka serhiy-storchaka deleted the test-tkinter-menu-methods branch June 19, 2026 08:59
@bedevere-app

bedevere-app Bot commented Jun 19, 2026

Copy link
Copy Markdown

GH-151709 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jun 19, 2026
@bedevere-app

bedevere-app Bot commented Jun 19, 2026

Copy link
Copy Markdown

GH-151710 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Jun 19, 2026
@bedevere-app

bedevere-app Bot commented Jun 19, 2026

Copy link
Copy Markdown

GH-151711 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Jun 19, 2026
serhiy-storchaka added a commit that referenced this pull request Jun 19, 2026
Cover previously-untested Menu methods in MenuTest: adding, inserting and
deleting items of every type, index resolution, invoking items, entry x/y
positions, and post/unpost/tk_popup mapping.

Also test per-entry configuration options and the errors raised for
invalid indices, entry types, option names and option values.
(cherry picked from commit ef5c32a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
serhiy-storchaka added a commit that referenced this pull request Jun 19, 2026
Cover previously-untested Menu methods in MenuTest: adding, inserting and
deleting items of every type, index resolution, invoking items, entry x/y
positions, and post/unpost/tk_popup mapping.

Also test per-entry configuration options and the errors raised for
invalid indices, entry types, option names and option values.
(cherry picked from commit ef5c32a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
serhiy-storchaka added a commit that referenced this pull request Jun 19, 2026
Cover previously-untested Menu methods in MenuTest: adding, inserting and
deleting items of every type, index resolution, invoking items, entry x/y
positions, and post/unpost/tk_popup mapping.

Also test per-entry configuration options and the errors raised for
invalid indices, entry types, option names and option values.
(cherry picked from commit ef5c32a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant