This commit is contained in:
Florian Bruhin 2014-05-12 17:46:15 +02:00
parent 7b7c82fe45
commit 7c1ba7ab48

View File

@ -42,9 +42,9 @@ class ConfigStub:
'a': 'a',
'ba': 'ba',
'ax': 'ax',
'ccc': 'ccc',},
'input': {'timeout': 100},
'test2': {'foo': 'bar', '<Ctrl+X>': 'ctrlx'}}
'ccc': 'ccc'},
'input': {'timeout': 100},
'test2': {'foo': 'bar', '<Ctrl+X>': 'ctrlx'}}
def section(self, name):
if name not in ['test', 'test2']:
@ -100,10 +100,6 @@ class SplitCountTests(TestCase):
self.kp._keystring = '10foo'
self.assertEqual(self.kp._split_count(), (10, 'foo'))
def test_normalcount(self):
self.kp._keystring = '10foo'
self.assertEqual(self.kp._split_count(), (10, 'foo'))
def test_minuscount(self):
self.kp._keystring = '-1foo'
self.assertEqual(self.kp._split_count(), (None, '-1foo'))
@ -165,8 +161,8 @@ class SpecialKeysTests(TestCase):
self.kp.execute.assert_called_once_with('ctrla', self.kp.Type.special)
def test_invalid_key(self):
self.kp.handle(FakeKeyEvent(Qt.Key_A, Qt.ControlModifier |
Qt.AltModifier))
self.kp.handle(FakeKeyEvent(Qt.Key_A, (Qt.ControlModifier |
Qt.AltModifier)))
self.assertFalse(self.kp.execute.called)
def test_keychain(self):
@ -195,8 +191,8 @@ class KeyChainTests(TestCase):
self.assertEqual(self.kp._keystring, '')
def test_invalid_special_key(self):
self.kp.handle(FakeKeyEvent(Qt.Key_A, Qt.ControlModifier |
Qt.AltModifier))
self.kp.handle(FakeKeyEvent(Qt.Key_A, (Qt.ControlModifier |
Qt.AltModifier)))
self.assertFalse(self.kp.execute.called)
self.assertEqual(self.kp._keystring, '')