mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-06-01 05:53:22 +00:00
Fixup python tests.
This commit is contained in:
parent
bdee456a0d
commit
f92d6ec070
@ -155,17 +155,18 @@ def test_json2c():
|
|||||||
* This file was generated by qmk json2c. You may or may not want to
|
* This file was generated by qmk json2c. You may or may not want to
|
||||||
* edit it directly.
|
* edit it directly.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[0] = LAYOUT_ortho_1x1(KC_A)
|
[0] = LAYOUT_ortho_1x1(KC_A)
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE)
|
|
||||||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
|
|
||||||
|
|
||||||
};
|
|
||||||
#endif // defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE)
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef OTHER_KEYMAP_C
|
||||||
|
# if __has_include_next(OTHER_KEYMAP_C)
|
||||||
|
# include_next OTHER_KEYMAP_C
|
||||||
|
# endif // __has_include_next(OTHER_KEYMAP_C)
|
||||||
|
#endif // OTHER_KEYMAP_C
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
@ -193,28 +194,23 @@ def test_json2c_stdin():
|
|||||||
* This file was generated by qmk json2c. You may or may not want to
|
* This file was generated by qmk json2c. You may or may not want to
|
||||||
* edit it directly.
|
* edit it directly.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[0] = LAYOUT_ortho_1x1(KC_A)
|
[0] = LAYOUT_ortho_1x1(KC_A)
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE)
|
|
||||||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
|
|
||||||
|
|
||||||
};
|
|
||||||
#endif // defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE)
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef OTHER_KEYMAP_C
|
||||||
|
# if __has_include_next(OTHER_KEYMAP_C)
|
||||||
|
# include_next OTHER_KEYMAP_C
|
||||||
|
# endif // __has_include_next(OTHER_KEYMAP_C)
|
||||||
|
#endif // OTHER_KEYMAP_C
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
def test_json2c_wrong_json():
|
|
||||||
result = check_subcommand('json2c', 'keyboards/handwired/pytest/info.json')
|
|
||||||
check_returncode(result, [1])
|
|
||||||
assert 'Invalid JSON keymap' in result.stdout
|
|
||||||
|
|
||||||
|
|
||||||
def test_json2c_no_json():
|
def test_json2c_no_json():
|
||||||
result = check_subcommand('json2c', 'keyboards/handwired/pytest/basic/keymaps/default/keymap.c')
|
result = check_subcommand('json2c', 'keyboards/handwired/pytest/basic/keymaps/default/keymap.c')
|
||||||
check_returncode(result, [1])
|
check_returncode(result, [1])
|
||||||
|
@ -20,17 +20,18 @@ def test_generate_c_pytest_basic():
|
|||||||
* This file was generated by qmk json2c. You may or may not want to
|
* This file was generated by qmk json2c. You may or may not want to
|
||||||
* edit it directly.
|
* edit it directly.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[0] = LAYOUT(KC_A)
|
[0] = LAYOUT(KC_A)
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE)
|
|
||||||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
|
|
||||||
|
|
||||||
};
|
|
||||||
#endif // defined(ENCODER_ENABLE) && defined(ENCODER_MAP_ENABLE)
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef OTHER_KEYMAP_C
|
||||||
|
# if __has_include_next(OTHER_KEYMAP_C)
|
||||||
|
# include_next OTHER_KEYMAP_C
|
||||||
|
# endif // __has_include_next(OTHER_KEYMAP_C)
|
||||||
|
#endif // OTHER_KEYMAP_C
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user