aboutsummaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python')
-rw-r--r--lib/python/qmk/tests/attrdict.py1
-rw-r--r--lib/python/qmk/tests/test_qmk_errors.py3
-rw-r--r--lib/python/qmk/tests/test_qmk_keymap.py1
-rw-r--r--lib/python/qmk/tests/test_qmk_path.py1
4 files changed, 5 insertions, 1 deletions
diff --git a/lib/python/qmk/tests/attrdict.py b/lib/python/qmk/tests/attrdict.py
index a2584b923..391c75c4e 100644
--- a/lib/python/qmk/tests/attrdict.py
+++ b/lib/python/qmk/tests/attrdict.py
@@ -3,6 +3,7 @@ class AttrDict(dict):
3 3
4 This should only be used to mock objects for unit testing. Please do not use this outside of qmk.tests. 4 This should only be used to mock objects for unit testing. Please do not use this outside of qmk.tests.
5 """ 5 """
6
6 def __init__(self, *args, **kwargs): 7 def __init__(self, *args, **kwargs):
7 super(AttrDict, self).__init__(*args, **kwargs) 8 super(AttrDict, self).__init__(*args, **kwargs)
8 self.__dict__ = self 9 self.__dict__ = self
diff --git a/lib/python/qmk/tests/test_qmk_errors.py b/lib/python/qmk/tests/test_qmk_errors.py
index 3f6b56713..1d8690b7e 100644
--- a/lib/python/qmk/tests/test_qmk_errors.py
+++ b/lib/python/qmk/tests/test_qmk_errors.py
@@ -1,7 +1,8 @@
1from qmk.errors import NoSuchKeyboardError 1from qmk.errors import NoSuchKeyboardError
2 2
3
3def test_NoSuchKeyboardError(): 4def test_NoSuchKeyboardError():
4 try: 5 try:
5 raise(NoSuchKeyboardError("test message")) 6 raise NoSuchKeyboardError("test message")
6 except NoSuchKeyboardError as e: 7 except NoSuchKeyboardError as e:
7 assert e.message == 'test message' 8 assert e.message == 'test message'
diff --git a/lib/python/qmk/tests/test_qmk_keymap.py b/lib/python/qmk/tests/test_qmk_keymap.py
index 6a565ee90..2db625600 100644
--- a/lib/python/qmk/tests/test_qmk_keymap.py
+++ b/lib/python/qmk/tests/test_qmk_keymap.py
@@ -1,5 +1,6 @@
1import qmk.keymap 1import qmk.keymap
2 2
3
3def test_template_onekey_proton_c(): 4def test_template_onekey_proton_c():
4 templ = qmk.keymap.template('handwired/onekey/proton_c') 5 templ = qmk.keymap.template('handwired/onekey/proton_c')
5 assert templ == qmk.keymap.DEFAULT_KEYMAP_C 6 assert templ == qmk.keymap.DEFAULT_KEYMAP_C
diff --git a/lib/python/qmk/tests/test_qmk_path.py b/lib/python/qmk/tests/test_qmk_path.py
index 23816be7e..94dbf3a6a 100644
--- a/lib/python/qmk/tests/test_qmk_path.py
+++ b/lib/python/qmk/tests/test_qmk_path.py
@@ -2,6 +2,7 @@ import os
2 2
3import qmk.path 3import qmk.path
4 4
5
5def test_keymap_onekey_pytest(): 6def test_keymap_onekey_pytest():
6 path = qmk.path.keymap('handwired/onekey/pytest') 7 path = qmk.path.keymap('handwired/onekey/pytest')
7 assert path == 'keyboards/handwired/onekey/keymaps' 8 assert path == 'keyboards/handwired/onekey/keymaps'