aboutsummaryrefslogtreecommitdiff
path: root/lib/python/qmk/tests
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python/qmk/tests')
-rw-r--r--lib/python/qmk/tests/test_cli_commands.py18
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py
index afdbc8142..022b24203 100644
--- a/lib/python/qmk/tests/test_cli_commands.py
+++ b/lib/python/qmk/tests/test_cli_commands.py
@@ -31,13 +31,13 @@ def check_returncode(result, expected=[0]):
31 assert result.returncode in expected 31 assert result.returncode in expected
32 32
33 33
34def test_cformat(): 34def test_format_c():
35 result = check_subcommand('cformat', '-n', 'quantum/matrix.c') 35 result = check_subcommand('format-c', '-n', 'quantum/matrix.c')
36 check_returncode(result) 36 check_returncode(result)
37 37
38 38
39def test_cformat_all(): 39def test_format_c_all():
40 result = check_subcommand('cformat', '-n', '-a') 40 result = check_subcommand('format-c', '-n', '-a')
41 check_returncode(result, [0, 1]) 41 check_returncode(result, [0, 1])
42 42
43 43
@@ -80,8 +80,8 @@ def test_hello():
80 assert 'Hello,' in result.stdout 80 assert 'Hello,' in result.stdout
81 81
82 82
83def test_pyformat(): 83def test_format_python():
84 result = check_subcommand('pyformat', '--dry-run') 84 result = check_subcommand('format-python', '--dry-run')
85 check_returncode(result) 85 check_returncode(result)
86 assert 'Python code in `bin/qmk` and `lib/python` is correctly formatted.' in result.stdout 86 assert 'Python code in `bin/qmk` and `lib/python` is correctly formatted.' in result.stdout
87 87
@@ -258,6 +258,12 @@ def test_generate_rules_mk():
258 assert 'MCU ?= atmega32u4' in result.stdout 258 assert 'MCU ?= atmega32u4' in result.stdout
259 259
260 260
261def test_generate_version_h():
262 result = check_subcommand('generate-version-h')
263 check_returncode(result)
264 assert '#define QMK_VERSION' in result.stdout
265
266
261def test_generate_layouts(): 267def test_generate_layouts():
262 result = check_subcommand('generate-layouts', '-kb', 'handwired/pytest/basic') 268 result = check_subcommand('generate-layouts', '-kb', 'handwired/pytest/basic')
263 check_returncode(result) 269 check_returncode(result)