diff options
author | Nick Brassel <[email protected]> | 2024-11-27 21:29:12 +1100 |
---|---|---|
committer | Nick Brassel <[email protected]> | 2024-11-27 21:29:12 +1100 |
commit | 9f76541b29056150cf57d69569a14a59e13995c7 (patch) | |
tree | 66c7398d873fcda88aebe3090603aefe045ff52e /lib/python/qmk/tests | |
parent | 57be4871616ee9a8fe042f6186010d436ec7d4b1 (diff) | |
parent | eb04b94eecbb9b3e64ca9c74f937b5f762440b17 (diff) | |
download | qmk_firmware-9f76541b29056150cf57d69569a14a59e13995c7.tar.gz qmk_firmware-9f76541b29056150cf57d69569a14a59e13995c7.zip |
Merge branch 'develop'0.27.0
Diffstat (limited to 'lib/python/qmk/tests')
-rw-r--r-- | lib/python/qmk/tests/test_cli_commands.py | 26 | ||||
-rw-r--r-- | lib/python/qmk/tests/test_qmk_keymap.py | 9 |
2 files changed, 13 insertions, 22 deletions
diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py index f18bd12f82..dd659fe0f2 100644 --- a/lib/python/qmk/tests/test_cli_commands.py +++ b/lib/python/qmk/tests/test_cli_commands.py @@ -152,17 +152,16 @@ def test_json2c(): * This file was generated by qmk json2c. You may or may not want to * edit it directly. */ + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [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 +# include OTHER_KEYMAP_C +#endif // OTHER_KEYMAP_C """ @@ -190,28 +189,21 @@ def test_json2c_stdin(): * This file was generated by qmk json2c. You may or may not want to * edit it directly. */ + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [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 +# include 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(): result = check_subcommand('json2c', 'keyboards/handwired/pytest/basic/keymaps/default/keymap.c') check_returncode(result, [1]) @@ -390,7 +382,7 @@ def test_find_contains(): def test_find_multiple_conditions(): # this is intended to match at least 'crkbd/rev1' result = check_subcommand( - 'find', '-f', 'exists(rgb_matrix.split_count)', '-f', 'contains(matrix_pins.cols, B1)', '-f', 'length(matrix_pins.cols, 6)', '-f', 'absent(eeprom.driver)', '-f', 'ws2812.pin=D3', '-p', 'rgb_matrix.split_count', '-p', 'matrix_pins.cols', '-p', + 'find', '-f', 'exists(rgb_matrix.split_count)', '-f', 'contains(matrix_pins.cols, B1)', '-f', 'length(matrix_pins.cols, 6)', '-f', 'absent(eeprom.driver)', '-f', 'ws2812.pin == D3', '-p', 'rgb_matrix.split_count', '-p', 'matrix_pins.cols', '-p', 'eeprom.driver', '-p', 'ws2812.pin' ) check_returncode(result) diff --git a/lib/python/qmk/tests/test_qmk_keymap.py b/lib/python/qmk/tests/test_qmk_keymap.py index 7482848eff..80cc679b00 100644 --- a/lib/python/qmk/tests/test_qmk_keymap.py +++ b/lib/python/qmk/tests/test_qmk_keymap.py @@ -20,17 +20,16 @@ def test_generate_c_pytest_basic(): * This file was generated by qmk json2c. You may or may not want to * edit it directly. */ + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [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 +# include OTHER_KEYMAP_C +#endif // OTHER_KEYMAP_C """ |