[3.11] gh-103685: Fix tkinter.Menu.index() for Tk 8.7 (GH-103686) (#103734)

gh-103685: Fix tkinter.Menu.index() for Tk 8.7 (GH-103686)

---------

(cherry picked from commit f0ed293f6a)

Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2023-04-23 19:29:58 -07:00 committed by GitHub
parent 5054459678
commit dc08c7a515
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 2 deletions

View file

@ -1378,6 +1378,11 @@ class MenuTest(AbstractWidgetTest, unittest.TestCase):
def create(self, **kwargs):
return tkinter.Menu(self.root, **kwargs)
def test_indexcommand_none(self):
widget = self.create()
i = widget.index('none')
self.assertIsNone(i)
def test_configure_postcommand(self):
widget = self.create()
self.checkCommandParam(widget, 'postcommand')