示例#1
0
 def test_get_hotkey_name_from_pressed(self):
     self.do(du_c+d_ctrl+d_a+d_b)
     self.assertEqual(hotkey.get_hotkey_name(), 'ctrl+a+b')
示例#2
0
 def test_get_hotkey_name_full(self):
     self.assertEqual(hotkey.get_hotkey_name(['+', 'left ctrl', 'shift', 'WIN', 'right alt']), 'ctrl+alt+shift+windows+plus')
示例#3
0
 def test_get_hotkey_name_multiple(self):
     self.assertEqual(hotkey.get_hotkey_name(['ctrl', 'b', '!', 'a']), 'ctrl+!+a+b')
示例#4
0
 def test_get_hotkey_name_duplicated(self):
     self.assertEqual(hotkey.get_hotkey_name(['+', 'plus']), 'plus')
示例#5
0
 def test_get_hotkey_name_plus(self):
     self.assertEqual(hotkey.get_hotkey_name(['+']), 'plus')
示例#6
0
 def test_get_hotkey_name_normalize(self):
     self.assertEqual(hotkey.get_hotkey_name(['SHIFT', 'left ctrl']), 'ctrl+shift')
示例#7
0
 def test_get_hotkey_name_modifiers(self):
     self.assertEqual(hotkey.get_hotkey_name(['a', 'shift', 'ctrl']), 'ctrl+shift+a')
示例#8
0
 def test_get_hotkey_name_simple(self):
     self.assertEqual(hotkey.get_hotkey_name(['a']), 'a')