Remove handwired/pytest/has_template
(#24232)
This commit is contained in:
parent
807ba71c89
commit
9f387f525c
9 changed files with 87 additions and 78 deletions
|
@ -11,30 +11,43 @@ def test_template_json_pytest_basic():
|
|||
assert templ == {'keyboard': 'handwired/pytest/basic'}
|
||||
|
||||
|
||||
def test_template_c_pytest_has_template():
|
||||
templ = qmk.keymap.template_c('handwired/pytest/has_template')
|
||||
assert templ == '#include QMK_KEYBOARD_H\nconst uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {__KEYMAP_GOES_HERE__};\n'
|
||||
|
||||
|
||||
def test_template_json_pytest_has_template():
|
||||
templ = qmk.keymap.template_json('handwired/pytest/has_template')
|
||||
assert templ == {'keyboard': 'handwired/pytest/has_template', "documentation": "This file is a keymap.json file for handwired/pytest/has_template"}
|
||||
|
||||
|
||||
def test_generate_c_pytest_has_template():
|
||||
def test_generate_c_pytest_basic():
|
||||
keymap_json = {
|
||||
'keyboard': 'handwired/pytest/has_template',
|
||||
'keyboard': 'handwired/pytest/basic',
|
||||
'layout': 'LAYOUT',
|
||||
'layers': [['KC_A']],
|
||||
'macros': None,
|
||||
}
|
||||
templ = qmk.keymap.generate_c(keymap_json)
|
||||
assert templ == '#include QMK_KEYBOARD_H\nconst uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {\t[0] = LAYOUT(KC_A)};\n'
|
||||
assert templ == """#include QMK_KEYBOARD_H
|
||||
#if __has_include("keymap.h")
|
||||
# include "keymap.h"
|
||||
#endif
|
||||
|
||||
|
||||
def test_generate_json_pytest_has_template():
|
||||
templ = qmk.keymap.generate_json('default', 'handwired/pytest/has_template', 'LAYOUT', [['KC_A']])
|
||||
assert templ == {"keyboard": "handwired/pytest/has_template", "documentation": "This file is a keymap.json file for handwired/pytest/has_template", "keymap": "default", "layout": "LAYOUT", "layers": [["KC_A"]]}
|
||||
/* THIS FILE WAS GENERATED!
|
||||
*
|
||||
* 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] = {
|
||||
\t[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)
|
||||
|
||||
|
||||
|
||||
"""
|
||||
|
||||
|
||||
def test_generate_json_pytest_basic():
|
||||
templ = qmk.keymap.generate_json('default', 'handwired/pytest/basic', 'LAYOUT', [['KC_A']])
|
||||
assert templ == {"keyboard": "handwired/pytest/basic", "keymap": "default", "layout": "LAYOUT", "layers": [["KC_A"]]}
|
||||
|
||||
|
||||
def test_parse_keymap_c():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue