summaryrefslogtreecommitdiff
path: root/lib/python/qmk/tests
diff options
context:
space:
mode:
authorskullY <skullydazed@gmail.com>2019-11-12 17:27:08 -0800
committerFlorian Didron <fdidron@users.noreply.github.com>2020-01-09 08:57:11 +0900
commit8d35ebab7ff516447da9269347857faf7ea3eb58 (patch)
treed27711a63939b277be27caa2678ac99b531e1741 /lib/python/qmk/tests
parent55b2c4c1edf5e8119be761a9b18eb50faaa68e8f (diff)
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
Diffstat (limited to 'lib/python/qmk/tests')
-rw-r--r--lib/python/qmk/tests/attrdict.py1
-rw-r--r--lib/python/qmk/tests/test_cli_commands.py2
-rw-r--r--lib/python/qmk/tests/test_qmk_path.py2
3 files changed, 2 insertions, 3 deletions
diff --git a/lib/python/qmk/tests/attrdict.py b/lib/python/qmk/tests/attrdict.py
index 391c75c4e1..a2584b9233 100644
--- a/lib/python/qmk/tests/attrdict.py
+++ b/lib/python/qmk/tests/attrdict.py
@@ -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
diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py
index 9a9dc4b958..55b8d253f7 100644
--- a/lib/python/qmk/tests/test_cli_commands.py
+++ b/lib/python/qmk/tests/test_cli_commands.py
@@ -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():
diff --git a/lib/python/qmk/tests/test_qmk_path.py b/lib/python/qmk/tests/test_qmk_path.py
index 94dbf3a6a6..d6961a0f65 100644
--- a/lib/python/qmk/tests/test_qmk_path.py
+++ b/lib/python/qmk/tests/test_qmk_path.py
@@ -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')