diff options
author | Ryan <fauxpark@gmail.com> | 2020-11-02 19:41:01 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-02 00:41:01 -0800 |
commit | e69da2db2c59a8017f0c9dee9933dd508d22b356 (patch) | |
tree | 69dbe7f0731199331f6975df2ada13feab09eaeb /lib/python/qmk/tests | |
parent | dc40f00aafeea148d8998c594c4e414d87ee84a3 (diff) |
`qmk info`: Add `--ascii` flag (#10793)
* `qmk info`: Add `--ascii` flag
* Fix typo
* Force ASCII for Windows/MSYS2
* Make it gooder
* Remove redundant windows check
* ...And this too
* Make pytest work on Windows
Diffstat (limited to 'lib/python/qmk/tests')
-rw-r--r-- | lib/python/qmk/tests/test_cli_commands.py | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py index 7ac0bcbde7..7c261db6cd 100644 --- a/lib/python/qmk/tests/test_cli_commands.py +++ b/lib/python/qmk/tests/test_cli_commands.py @@ -1,7 +1,11 @@ +import platform + from subprocess import STDOUT, PIPE from qmk.commands import run +is_windows = 'windows' in platform.platform().lower() + def check_subcommand(command, *args): cmd = ['bin/qmk', command] + list(args) @@ -148,7 +152,11 @@ def test_info_keymap_render(): check_returncode(result) assert 'Keyboard Name: handwired/onekey/pytest' in result.stdout assert 'Processor: STM32F303' in result.stdout - assert '│A │' in result.stdout + + if is_windows: + assert '|A |' in result.stdout + else: + assert '│A │' in result.stdout def test_info_matrix_render(): @@ -157,7 +165,12 @@ def test_info_matrix_render(): assert 'Keyboard Name: handwired/onekey/pytest' in result.stdout assert 'Processor: STM32F303' in result.stdout assert 'LAYOUT_ortho_1x1' in result.stdout - assert '│0A│' in result.stdout + + if is_windows: + assert '|0A|' in result.stdout + else: + assert '│0A│' in result.stdout + assert 'Matrix for "LAYOUT_ortho_1x1"' in result.stdout |