summaryrefslogtreecommitdiff
path: root/tests/unit/keyinput/test_keyutils.py
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2022-05-19 16:50:00 +0200
committerFlorian Bruhin <me@the-compiler.org>2022-08-23 18:31:41 +0200
commit1f3e7e19f8718b4e693e9db6c0ee5b1469b27ba3 (patch)
tree19e40ed793df1a4ea4e3d59b45ca8a4e388e3bde /tests/unit/keyinput/test_keyutils.py
parent7f7fe5eca28c33996ac2c2355d3a0d8052249154 (diff)
downloadqutebrowser-1f3e7e19f8718b4e693e9db6c0ee5b1469b27ba3.tar.gz
qutebrowser-1f3e7e19f8718b4e693e9db6c0ee5b1469b27ba3.zip
Make keyutils._assert_plain_* work on Qt 6
Diffstat (limited to 'tests/unit/keyinput/test_keyutils.py')
-rw-r--r--tests/unit/keyinput/test_keyutils.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/unit/keyinput/test_keyutils.py b/tests/unit/keyinput/test_keyutils.py
index a7af4c3e5..ba13addc9 100644
--- a/tests/unit/keyinput/test_keyutils.py
+++ b/tests/unit/keyinput/test_keyutils.py
@@ -645,5 +645,10 @@ def test_is_modifier_key(key, ismodifier):
keyutils._modifiers_to_string,
])
def test_non_plain(func):
+ comb = Qt.Key.Key_X | Qt.KeyboardModifier.ControlModifier
+ if machinery.IS_QT6:
+ # QKeyCombination
+ comb = comb.toCombined()
+
with pytest.raises(AssertionError):
- func(Qt.Key.Key_X | Qt.KeyboardModifier.ControlModifier)
+ func(comb)