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) | |
| download | qmk_firmware-e69da2db2c59a8017f0c9dee9933dd508d22b356.tar.gz qmk_firmware-e69da2db2c59a8017f0c9dee9933dd508d22b356.zip | |
`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 7ac0bcbde..7c261db6c 100644 --- a/lib/python/qmk/tests/test_cli_commands.py +++ b/lib/python/qmk/tests/test_cli_commands.py | |||
| @@ -1,7 +1,11 @@ | |||
| 1 | import platform | ||
| 2 | |||
| 1 | from subprocess import STDOUT, PIPE | 3 | from subprocess import STDOUT, PIPE |
| 2 | 4 | ||
| 3 | from qmk.commands import run | 5 | from qmk.commands import run |
| 4 | 6 | ||
| 7 | is_windows = 'windows' in platform.platform().lower() | ||
| 8 | |||
| 5 | 9 | ||
| 6 | def check_subcommand(command, *args): | 10 | def check_subcommand(command, *args): |
| 7 | cmd = ['bin/qmk', command] + list(args) | 11 | cmd = ['bin/qmk', command] + list(args) |
| @@ -148,7 +152,11 @@ def test_info_keymap_render(): | |||
| 148 | check_returncode(result) | 152 | check_returncode(result) |
| 149 | assert 'Keyboard Name: handwired/onekey/pytest' in result.stdout | 153 | assert 'Keyboard Name: handwired/onekey/pytest' in result.stdout |
| 150 | assert 'Processor: STM32F303' in result.stdout | 154 | assert 'Processor: STM32F303' in result.stdout |
| 151 | assert '│A │' in result.stdout | 155 | |
| 156 | if is_windows: | ||
| 157 | assert '|A |' in result.stdout | ||
| 158 | else: | ||
| 159 | assert '│A │' in result.stdout | ||
| 152 | 160 | ||
| 153 | 161 | ||
| 154 | def test_info_matrix_render(): | 162 | def test_info_matrix_render(): |
| @@ -157,7 +165,12 @@ def test_info_matrix_render(): | |||
| 157 | assert 'Keyboard Name: handwired/onekey/pytest' in result.stdout | 165 | assert 'Keyboard Name: handwired/onekey/pytest' in result.stdout |
| 158 | assert 'Processor: STM32F303' in result.stdout | 166 | assert 'Processor: STM32F303' in result.stdout |
| 159 | assert 'LAYOUT_ortho_1x1' in result.stdout | 167 | assert 'LAYOUT_ortho_1x1' in result.stdout |
| 160 | assert '│0A│' in result.stdout | 168 | |
| 169 | if is_windows: | ||
| 170 | assert '|0A|' in result.stdout | ||
| 171 | else: | ||
| 172 | assert '│0A│' in result.stdout | ||
| 173 | |||
| 161 | assert 'Matrix for "LAYOUT_ortho_1x1"' in result.stdout | 174 | assert 'Matrix for "LAYOUT_ortho_1x1"' in result.stdout |
| 162 | 175 | ||
| 163 | 176 | ||
