class_docstr: Test validation methods: ok, keys_ok, bind_ok.
class_docstr_tok: ["Test","validation","methods",":","ok",",","keys_ok",",","bind_ok","."]
code: def test_keys_dup(self):
      for mods, final, seq in (
          ([], "F12", "<Key-F12>"),
          (["Control"], "x", "<Control-Key-x>"),
          (["Control"], "X", "<Control-Key-X>"),
      ):
          with self.subTest(m=mods, f=final, s=seq):
              self.dialog.list_keys_final.get.result = final
              self.dialog.get_modifiers.result = mods
              self.assertFalse(self.dialog.keys_ok(seq))
              self.assertIn(
                  "already in use", self.dialog.showerror.message
              )
      self.dialog.get_modifiers.result = []
  
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 10 for calling the ValidationTest obj's underlying member method code with example usage: obj.test_keys_dup() without return types