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

Method test_custom_name

Lib/idlelib/idle_test/test_configdialog.py:895–907  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

893 eq(d.load_keys_list.args, ('IDLE Classic OSX', ))
894
895 def test_custom_name(self):
896 d = self.page
897
898 # If no selections, doesn't get added.
899 d.customlist.SetMenu([], '- no custom keys -')
900 self.assertNotIn('Keys', mainpage)
901 self.assertEqual(d.load_keys_list.called, 0)
902
903 # Custom name selected.
904 changes.clear()
905 d.customlist.SetMenu(['a', 'b', 'c'], 'c')
906 self.assertEqual(mainpage, {'Keys': {'name': 'c'}})
907 self.assertEqual(d.load_keys_list.called, 1)
908
909 def test_keybinding(self):
910 idleConf.SetOption('extensions', 'ZzDummy', 'enable', 'True')

Callers

nothing calls this directly

Calls 4

SetMenuMethod · 0.80
assertNotInMethod · 0.80
assertEqualMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected