diff options
author | skullY <skullydazed@gmail.com> | 2019-11-12 17:27:08 -0800 |
---|---|---|
committer | skullydazed <skullydazed@users.noreply.github.com> | 2019-11-12 18:41:38 -0800 |
commit | 79edb7c5942108774e667c172550a1519c5543ac (patch) | |
tree | 37fc007c4548f2cb86f51c6608b7da14e30acec0 /lib/python/qmk/tests | |
parent | d1b6c11b7f4cc24c50d2b640a94925acf6450da6 (diff) | |
download | qmk_firmware-79edb7c5942108774e667c172550a1519c5543ac.tar.gz qmk_firmware-79edb7c5942108774e667c172550a1519c5543ac.zip |
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.py | 1 | ||||
-rw-r--r-- | lib/python/qmk/tests/test_cli_commands.py | 2 | ||||
-rw-r--r-- | lib/python/qmk/tests/test_qmk_path.py | 2 |
3 files changed, 2 insertions, 3 deletions
diff --git a/lib/python/qmk/tests/attrdict.py b/lib/python/qmk/tests/attrdict.py index 391c75c4e..a2584b923 100644 --- a/lib/python/qmk/tests/attrdict.py +++ b/lib/python/qmk/tests/attrdict.py | |||
@@ -3,7 +3,6 @@ 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 | |||
7 | def __init__(self, *args, **kwargs): | 6 | def __init__(self, *args, **kwargs): |
8 | super(AttrDict, self).__init__(*args, **kwargs) | 7 | super(AttrDict, self).__init__(*args, **kwargs) |
9 | self.__dict__ = self | 8 | self.__dict__ = self |
diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py index 9a9dc4b95..55b8d253f 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): | |||
7 | 7 | ||
8 | 8 | ||
9 | def test_cformat(): | 9 | def test_cformat(): |
10 | assert check_subcommand('cformat', 'tmk_core/common/backlight.c').returncode == 0 | 10 | assert check_subcommand('cformat', 'tmk_core/common/keyboard.c').returncode == 0 |
11 | 11 | ||
12 | 12 | ||
13 | def test_compile(): | 13 | def test_compile(): |
diff --git a/lib/python/qmk/tests/test_qmk_path.py b/lib/python/qmk/tests/test_qmk_path.py index 94dbf3a6a..d6961a0f6 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(): | |||
10 | 10 | ||
11 | def test_normpath(): | 11 | def test_normpath(): |
12 | path = qmk.path.normpath('lib/python') | 12 | path = qmk.path.normpath('lib/python') |
13 | assert path == os.environ['ORIG_CWD'] + '/lib/python' | 13 | assert path == os.path.join(os.environ['ORIG_CWD'], 'lib/python') |