MCPcopy Create free account
hub / github.com/python/cpython / test_keys_dup

Method test_keys_dup

Lib/idlelib/idle_test/test_config_key.py:83–92  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

81 self.dialog.get_modifiers.result = []
82
83 def test_keys_dup(self):
84 for mods, final, seq in (([], 'F12', '<Key-F12>'),
85 (['Control'], 'x', '<Control-Key-x>'),
86 (['Control'], 'X', '<Control-Key-X>')):
87 with self.subTest(m=mods, f=final, s=seq):
88 self.dialog.list_keys_final.get.result = final
89 self.dialog.get_modifiers.result = mods
90 self.assertFalse(self.dialog.keys_ok(seq))
91 self.assertIn('already in use', self.dialog.showerror.message)
92 self.dialog.get_modifiers.result = []
93
94 def test_bind_ok(self):
95 self.assertTrue(self.dialog.bind_ok('<Control-Shift-Key-a>'))

Callers

nothing calls this directly

Calls 4

assertFalseMethod · 0.80
keys_okMethod · 0.80
assertInMethod · 0.80
subTestMethod · 0.45

Tested by

no test coverage detected