forked from mirrors/qmk_userspace
Small CLI cleanups
* yapf changes * Fix the cformat test * Make the normpath test work when run from / * `qmk config`: Mark `--read-only` as arg_only
This commit is contained in:
parent
d1b6c11b7f
commit
79edb7c594
6 changed files with 4 additions and 5 deletions
|
@ -3,7 +3,6 @@ class AttrDict(dict):
|
|||
|
||||
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
|
||||
|
|
|
@ -7,7 +7,7 @@ def check_subcommand(command, *args):
|
|||
|
||||
|
||||
def test_cformat():
|
||||
assert check_subcommand('cformat', 'tmk_core/common/backlight.c').returncode == 0
|
||||
assert check_subcommand('cformat', 'tmk_core/common/keyboard.c').returncode == 0
|
||||
|
||||
|
||||
def test_compile():
|
||||
|
|
|
@ -10,4 +10,4 @@ def test_keymap_onekey_pytest():
|
|||
|
||||
def test_normpath():
|
||||
path = qmk.path.normpath('lib/python')
|
||||
assert path == os.environ['ORIG_CWD'] + '/lib/python'
|
||||
assert path == os.path.join(os.environ['ORIG_CWD'], 'lib/python')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue