This should only be used to mock objects for unit testing. Please do not use this outside of qmk.tests.
"""
+
def __init__(self, *args, **kwargs):
super(AttrDict, self).__init__(*args, **kwargs)
self.__dict__ = self
from qmk.errors import NoSuchKeyboardError
+
def test_NoSuchKeyboardError():
try:
- raise(NoSuchKeyboardError("test message"))
+ raise NoSuchKeyboardError("test message")
except NoSuchKeyboardError as e:
assert e.message == 'test message'
import qmk.keymap
+
def test_template_onekey_proton_c():
templ = qmk.keymap.template('handwired/onekey/proton_c')
assert templ == qmk.keymap.DEFAULT_KEYMAP_C
import qmk.path
+
def test_keymap_onekey_pytest():
path = qmk.path.keymap('handwired/onekey/pytest')
assert path == 'keyboards/handwired/onekey/keymaps'