FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-130482: Add ability to specify name for `tkinter.OptionMenu` and `tkinter.ttk.OptionMenu` by Xiaokang2022 · Pull Request #130502 · python/cpython · GitHub

Repository navigation

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
Prev Previous commit
Update Lib/test/test_ttk/test_extensions.py
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
  • Loading branch information
Xiaokang2022 and serhiy-storchaka authored May 2, 2025
commit e2091ed5be0d4b430f5f48b6e82947cf87c5132f
3 changes: 2 additions & 1 deletion Lib/test/test_ttk/test_extensions.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,8 @@ def cb_test(*args):
def test_specify_name(self):
textvar = tkinter.StringVar(self.root)
widget = ttk.OptionMenu(self.root, textvar, ":)", name="option_menu_ex")
self.assertIs(self.root.nametowidget("option_menu_ex"), widget)
self.assertEqual(str(widget), ".option_menu_ex")
self.assertIs(self.root.children["option_menu_ex"], widget)


class DefaultRootTest(AbstractDefaultRootTest, unittest.TestCase):
Expand Down

Back | FazBrowse Home | New Git URL