Update test_init_unknown/test_init_invalid for KeyboardModifierMask

-1 & Qt.KeyboardModifierMask == Qt.Key_unknown
This commit is contained in:
Florian Bruhin 2018-03-05 22:56:58 +01:00
parent 78f6ad14c2
commit 0ee7fac727

View File

@ -203,14 +203,14 @@ class TestKeySequence:
seq = keyutils.KeySequence()
assert not seq
def test_init_unknown(self):
@pytest.mark.parametrize('key', [Qt.Key_unknown, -1])
def test_init_unknown(self, key):
with pytest.raises(keyutils.KeyParseError):
keyutils.KeySequence(Qt.Key_unknown)
keyutils.KeySequence(key)
@pytest.mark.parametrize('key', [0, -1])
def test_init_invalid(self, key):
def test_init_invalid(self):
with pytest.raises(AssertionError):
keyutils.KeySequence(-1)
keyutils.KeySequence(0)
@pytest.mark.parametrize('orig, normalized', [
('<Control+x>', '<Ctrl+x>'),