class_docstr: Test selecting key on Basic frames.
class_docstr_tok: ["Test","selecting","key","on","Basic","frames","."]
code: def test_get_modifiers(self):
      dialog = self.dialog
      gm = dialog.get_modifiers
      eq = self.assertEqual
  
      # Modifiers are set on/off by invoking the checkbutton.
      dialog.modifier_checkbuttons["foo"].invoke()
      eq(gm(), ["foo"])
  
      dialog.modifier_checkbuttons["BAZ"].invoke()
      eq(gm(), ["foo", "BAZ"])
  
      dialog.modifier_checkbuttons["foo"].invoke()
      eq(gm(), ["BAZ"])
  
imports: from idlelib import config_key
  from test.support import requires
  import unittest
  from unittest import mock
  from tkinter import Tk, TclError
  from idlelib.idle_test.mock_idle import Func
  from idlelib.idle_test.mock_tk import Mbox_func
label_desc: Use image node_id 4 for calling the KeySelectionTest obj's underlying member method code with example usage: obj.test_get_modifiers() without return types