Add test for hints with numberpad numbers

This commit is contained in:
George Edward Bulmer 2018-03-21 17:06:13 +00:00
parent 0645865d22
commit 51f9464eb2

View File

@ -96,3 +96,11 @@ class TestHintKeyParser:
assert match == QKeySequence.ExactMatch
keyparser.execute.assert_called_with('follow-hint -s as', None)
def test_numberkey_hint_match(self, keyparser, fake_keyevent):
keyparser.update_bindings(['21', '22'])
match = keyparser.handle(fake_keyevent(Qt.Key_2, Qt.KeypadModifier))
assert match == QKeySequence.PartialMatch
match = keyparser.handle(fake_keyevent(Qt.Key_2, Qt.KeypadModifier))
assert match == QKeySequence.ExactMatch