Example #1
0
 def test_key_06(self):
     hotkey = HotKey(u'Home', ctrl=True, shift=True, alt=True)
     ctrl = HotkeyCtrl(self._mainWnd)
     ctrl.SetValue(hotkey)
     self.assertEqual(ctrl.GetText(), u'Ctrl+Shift+Alt+Home')
     self.assertEqual(ctrl.GetValue(), hotkey)
Example #2
0
 def test_none_02(self):
     ctrl = HotkeyCtrl(self._mainWnd)
     ctrl.SetValue(None)
     self.assertEqual(ctrl.GetText(), u'')
     self.assertEqual(ctrl.GetValue(), None)
Example #3
0
 def test_key_04(self):
     hotkey = HotKey(u'X', alt=True)
     ctrl = HotkeyCtrl(self._mainWnd)
     ctrl.SetValue(hotkey)
     self.assertEqual(ctrl.GetText(), u'Alt+X')
     self.assertEqual(ctrl.GetValue(), hotkey)
Example #4
0
 def test_empty(self):
     ctrl = HotkeyCtrl(self._mainWnd)
     self.assertEqual(ctrl.GetText(), u'')
     self.assertEqual(ctrl.GetValue(), None)
Example #5
0
 def test_key_05(self):
     hotkey = HotKey('X', ctrl=True, shift=True, alt=True)
     ctrl = HotkeyCtrl(self.mainWindow)
     ctrl.SetValue(hotkey)
     self.assertEqual(ctrl.GetText(), 'Ctrl+Shift+Alt+X')
     self.assertEqual(ctrl.GetValue(), hotkey)
Example #6
0
 def test_key_01(self):
     hotkey = HotKey('X')
     ctrl = HotkeyCtrl(self.mainWindow)
     ctrl.SetValue(hotkey)
     self.assertEqual(ctrl.GetText(), 'X')
     self.assertEqual(ctrl.GetValue(), hotkey)
Example #7
0
 def test_none_01(self):
     ctrl = HotkeyCtrl(self.mainWindow, -1, None)
     self.assertEqual(ctrl.GetText(), '')
     self.assertEqual(ctrl.GetValue(), None)
Example #8
0
 def test_empty(self):
     ctrl = HotkeyCtrl(self.mainWindow)
     self.assertEqual(ctrl.GetText(), '')
     self.assertEqual(ctrl.GetValue(), None)