kmk_firmware/tests/test_kmk_extension_stringy_keymaps.py

26 lines
785 B
Python
Raw Normal View History

2022-04-29 20:21:16 +02:00
import unittest
2022-05-05 08:55:37 +02:00
from kmk.extensions.stringy_keymaps import StringyKeymaps
2022-04-29 20:21:16 +02:00
from kmk.keys import KC
from tests.keyboard_test import KeyboardTest
2022-05-04 19:15:30 +02:00
class Test_extension_stringy_keymaps(unittest.TestCase):
2022-04-29 20:21:16 +02:00
def test_basic_kmk_keyboard_replace_string_primary_name(self):
keyboard = KeyboardTest(
2022-05-05 08:55:37 +02:00
[], [['1', '2', '3', '4']], extensions={StringyKeymaps()}
2022-04-29 20:21:16 +02:00
)
keyboard.test('Simple key press', [(0, True), (0, False)], [{KC.N1}, {}])
def test_basic_kmk_keyboard_replace_string_secondary_name(self):
keyboard = KeyboardTest(
2022-05-05 08:55:37 +02:00
[], [['N1', 'N2', 'N3', 'N4']], extensions={StringyKeymaps()}
2022-04-29 20:21:16 +02:00
)
keyboard.test('Simple key press', [(0, True), (0, False)], [{KC.N1}, {}])
if __name__ == '__main__':
unittest.main()