Merge commit 'd9e077468ab3446cbd7306a453a73dad2c1403e8' into firmware_21
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
{
|
||||
"keyboard_name": "tester",
|
||||
"maintainer": "qmk",
|
||||
"height": 5,
|
||||
"width": 15,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
|
||||
@@ -31,13 +31,13 @@ def check_returncode(result, expected=[0]):
|
||||
assert result.returncode in expected
|
||||
|
||||
|
||||
def test_cformat():
|
||||
result = check_subcommand('cformat', '-n', 'quantum/matrix.c')
|
||||
def test_format_c():
|
||||
result = check_subcommand('format-c', '-n', 'quantum/matrix.c')
|
||||
check_returncode(result)
|
||||
|
||||
|
||||
def test_cformat_all():
|
||||
result = check_subcommand('cformat', '-n', '-a')
|
||||
def test_format_c_all():
|
||||
result = check_subcommand('format-c', '-n', '-a')
|
||||
check_returncode(result, [0, 1])
|
||||
|
||||
|
||||
@@ -80,8 +80,8 @@ def test_hello():
|
||||
assert 'Hello,' in result.stdout
|
||||
|
||||
|
||||
def test_pyformat():
|
||||
result = check_subcommand('pyformat', '--dry-run')
|
||||
def test_format_python():
|
||||
result = check_subcommand('format-python', '--dry-run')
|
||||
check_returncode(result)
|
||||
assert 'Python code in `bin/qmk` and `lib/python` is correctly formatted.' in result.stdout
|
||||
|
||||
@@ -258,6 +258,12 @@ def test_generate_rules_mk():
|
||||
assert 'MCU ?= atmega32u4' in result.stdout
|
||||
|
||||
|
||||
def test_generate_version_h():
|
||||
result = check_subcommand('generate-version-h')
|
||||
check_returncode(result)
|
||||
assert '#define QMK_VERSION' in result.stdout
|
||||
|
||||
|
||||
def test_generate_layouts():
|
||||
result = check_subcommand('generate-layouts', '-kb', 'handwired/pytest/basic')
|
||||
check_returncode(result)
|
||||
@@ -267,7 +273,7 @@ def test_generate_layouts():
|
||||
def test_format_json_keyboard():
|
||||
result = check_subcommand('format-json', '--format', 'keyboard', 'lib/python/qmk/tests/minimal_info.json')
|
||||
check_returncode(result)
|
||||
assert result.stdout == '{\n "keyboard_name": "tester",\n "maintainer": "qmk",\n "height": 5,\n "width": 15,\n "layouts": {\n "LAYOUT": {\n "layout": [\n { "label": "KC_A", "matrix": [0, 0], "x": 0, "y": 0 }\n ]\n }\n }\n}\n'
|
||||
assert result.stdout == '{\n "keyboard_name": "tester",\n "maintainer": "qmk",\n "layouts": {\n "LAYOUT": {\n "layout": [\n { "label": "KC_A", "matrix": [0, 0], "x": 0, "y": 0 }\n ]\n }\n }\n}\n'
|
||||
|
||||
|
||||
def test_format_json_keymap():
|
||||
@@ -279,7 +285,7 @@ def test_format_json_keymap():
|
||||
def test_format_json_keyboard_auto():
|
||||
result = check_subcommand('format-json', '--format', 'auto', 'lib/python/qmk/tests/minimal_info.json')
|
||||
check_returncode(result)
|
||||
assert result.stdout == '{\n "keyboard_name": "tester",\n "maintainer": "qmk",\n "height": 5,\n "width": 15,\n "layouts": {\n "LAYOUT": {\n "layout": [\n { "label": "KC_A", "matrix": [0, 0], "x": 0, "y": 0 }\n ]\n }\n }\n}\n'
|
||||
assert result.stdout == '{\n "keyboard_name": "tester",\n "maintainer": "qmk",\n "layouts": {\n "LAYOUT": {\n "layout": [\n { "label": "KC_A", "matrix": [0, 0], "x": 0, "y": 0 }\n ]\n }\n }\n}\n'
|
||||
|
||||
|
||||
def test_format_json_keymap_auto():
|
||||
|
||||
Reference in New Issue
Block a user