MCPcopy Index your code
hub / github.com/python/cpython / test_get_keybinding

Method test_get_keybinding

Lib/idlelib/idle_test/test_config.py:474–489  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

472 userextn.remove_section('ZzDummy')
473
474 def test_get_keybinding(self):
475 conf = self.mock_config()
476
477 eq = self.assertEqual
478 eq(conf.GetKeyBinding('IDLE Modern Unix', '<<copy>>'),
479 ['<Control-Shift-Key-C>', '<Control-Key-Insert>'])
480 eq(conf.GetKeyBinding('IDLE Classic Unix', '<<copy>>'),
481 ['<Alt-Key-w>', '<Meta-Key-w>'])
482 eq(conf.GetKeyBinding('IDLE Classic Windows', '<<copy>>'),
483 ['<Control-Key-c>', '<Control-Key-C>'])
484 eq(conf.GetKeyBinding('IDLE Classic Mac', '<<copy>>'), ['<Command-Key-c>'])
485 eq(conf.GetKeyBinding('IDLE Classic OSX', '<<copy>>'), ['<Command-Key-c>'])
486
487 # Test keybinding not exists
488 eq(conf.GetKeyBinding('NOT EXISTS', '<<copy>>'), [])
489 eq(conf.GetKeyBinding('IDLE Modern Unix', 'NOT EXISTS'), [])
490
491 def test_get_current_keyset(self):
492 current_platform = sys.platform

Callers

nothing calls this directly

Calls 3

mock_configMethod · 0.95
eqFunction · 0.85
GetKeyBindingMethod · 0.80

Tested by

no test coverage detected