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)
def test_none_02(self): ctrl = HotkeyCtrl(self._mainWnd) ctrl.SetValue(None) self.assertEqual(ctrl.GetText(), u'') self.assertEqual(ctrl.GetValue(), None)
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)
def test_empty(self): ctrl = HotkeyCtrl(self._mainWnd) self.assertEqual(ctrl.GetText(), u'') self.assertEqual(ctrl.GetValue(), None)
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)
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)
def test_none_01(self): ctrl = HotkeyCtrl(self.mainWindow, -1, None) self.assertEqual(ctrl.GetText(), '') self.assertEqual(ctrl.GetValue(), None)
def test_empty(self): ctrl = HotkeyCtrl(self.mainWindow) self.assertEqual(ctrl.GetText(), '') self.assertEqual(ctrl.GetValue(), None)