From d5a353b26364a7486d01c0b50605f8b4be2ea114 Mon Sep 17 00:00:00 2001 From: Ryan Date: Mon, 2 Nov 2020 19:41:01 +1100 Subject: `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 --- lib/python/qmk/tests/test_cli_commands.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'lib/python/qmk/tests') 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 -- cgit v1.2.3