diff options
Diffstat (limited to 'lib/python/qmk/tests')
| -rw-r--r-- | lib/python/qmk/tests/minimal_info.json | 2 | ||||
| -rw-r--r-- | lib/python/qmk/tests/test_cli_commands.py | 12 | 
2 files changed, 9 insertions, 5 deletions
diff --git a/lib/python/qmk/tests/minimal_info.json b/lib/python/qmk/tests/minimal_info.json index 3aae4722bf..7f5ec1f983 100644 --- a/lib/python/qmk/tests/minimal_info.json +++ b/lib/python/qmk/tests/minimal_info.json @@ -4,7 +4,7 @@      "layouts": {          "LAYOUT": {              "layout": [ -                { "label": "KC_A", "matrix": [0, 0], "x": 0, "y": 0 } +                {"label": "KC_A", "matrix": [0, 0], "x": 0, "y": 0}              ]          }      } diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py index e598b281a6..13359808a0 100644 --- a/lib/python/qmk/tests/test_cli_commands.py +++ b/lib/python/qmk/tests/test_cli_commands.py @@ -168,7 +168,7 @@ def test_json2c_wrong_json():  def test_json2c_no_json(): -    result = check_subcommand('json2c', 'keyboards/handwired/pytest/pytest.h') +    result = check_subcommand('json2c', 'keyboards/handwired/pytest/basic/keymaps/default/keymap.c')      check_returncode(result, [1])      assert 'Invalid JSON encountered' in result.stdout @@ -188,7 +188,11 @@ def test_info_keyboard_render():      assert 'Keyboard Name: pytest' in result.stdout      assert 'Processor: atmega32u4' in result.stdout      assert 'Layouts:' in result.stdout -    assert 'k0' in result.stdout + +    if is_windows: +        assert '|  |' in result.stdout +    else: +        assert '│  │' in result.stdout  def test_info_keymap_render(): @@ -291,7 +295,7 @@ def test_generate_version_h():  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    "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(): @@ -303,7 +307,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    "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():  | 
