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

Method test_get_current_keyset

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

Source from the content-addressed store, hash-verified

489 eq(conf.GetKeyBinding('IDLE Modern Unix', 'NOT EXISTS'), [])
490
491 def test_get_current_keyset(self):
492 current_platform = sys.platform
493 conf = self.mock_config()
494
495 # Ensure that platform isn't darwin
496 sys.platform = 'some-linux'
497 self.assertEqual(conf.GetCurrentKeySet(), conf.GetKeySet(conf.CurrentKeys()))
498
499 # This should not be the same, since replace <Alt- to <Option-.
500 # Above depended on config-extensions.def having Alt keys,
501 # which is no longer true.
502 # sys.platform = 'darwin'
503 # self.assertNotEqual(conf.GetCurrentKeySet(), conf.GetKeySet(conf.CurrentKeys()))
504
505 # Restore platform
506 sys.platform = current_platform
507
508 def test_get_keyset(self):
509 conf = self.mock_config()

Callers

nothing calls this directly

Calls 5

mock_configMethod · 0.95
GetCurrentKeySetMethod · 0.80
GetKeySetMethod · 0.80
CurrentKeysMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected