From 156207438388c477d47dad51a91ce63f6b87e5f7 Mon Sep 17 00:00:00 2001
From: user202729 <25191436+user202729@users.noreply.github.com>
Date: Sun, 17 Feb 2019 10:08:29 +0700
Subject: Add tests for AltGr modifier key
---
tests/unit/keyinput/test_keyutils.py | 7 +++++++
1 file changed, 7 insertions(+)
(limited to 'tests/unit')
diff --git a/tests/unit/keyinput/test_keyutils.py b/tests/unit/keyinput/test_keyutils.py
index d6e7bce34..e0269adc8 100644
--- a/tests/unit/keyinput/test_keyutils.py
+++ b/tests/unit/keyinput/test_keyutils.py
@@ -158,9 +158,16 @@ class TestKeyToString:
(Qt.Key_A,
Qt.ControlModifier | Qt.AltModifier | Qt.MetaModifier | Qt.ShiftModifier,
''),
+ (ord('Œ'), Qt.NoModifier, '<Œ>'),
+ (ord('Œ'), Qt.ShiftModifier, ''),
+ (ord('Œ'), Qt.GroupSwitchModifier, ''),
+ (ord('Œ'), Qt.GroupSwitchModifier | Qt.ShiftModifier, ''),
(Qt.Key_Shift, Qt.ShiftModifier, ''),
(Qt.Key_Shift, Qt.ShiftModifier | Qt.ControlModifier, ''),
+ (Qt.Key_Alt, Qt.AltModifier, ''),
+ (Qt.Key_Shift, Qt.GroupSwitchModifier | Qt.ShiftModifier, ''),
+ (Qt.Key_AltGr, Qt.GroupSwitchModifier, ''),
])
def test_key_info_str(key, modifiers, expected):
assert str(keyutils.KeyInfo(key, modifiers)) == expected
--
cgit v1.2.3-54-g00ecf