From 836b92ccbf8e51c414483d499ef36d103391d849 Mon Sep 17 00:00:00 2001 From: edraft Date: Wed, 17 Sep 2025 20:43:55 +0200 Subject: [PATCH] Further console test --- tests/custom/console/main.py | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/tests/custom/console/main.py b/tests/custom/console/main.py index 814d6c41..ed38da86 100644 --- a/tests/custom/console/main.py +++ b/tests/custom/console/main.py @@ -15,32 +15,27 @@ def test_console(): Console.write_line("Hello World") Console.write("\nName: ") Console.write_line(" Hello", Console.read_line()) - Console.clear() Console.write_at(5, 5, "at 5, 5") Console.write_at(10, 10, "at 10, 10") if __name__ == "__main__": Console.write_line("Hello World\n") + Console.clear() Console.spinner( "Test:", test_spinner, spinner_foreground_color=ForegroundColorEnum.cyan, text_foreground_color="green" ) + test_console() Console.write_line("HOLD BACK") - # opts = [ - # 'Option 1', - # 'Option 2', - # 'Option 3', - # 'Option 4' - # ] - # selected = Console.select( - # '>', - # 'Select item:', - # opts, - # header_foreground_color=ForegroundColorEnum.blue, - # option_foreground_color=ForegroundColorEnum.green, - # cursor_foreground_color=ForegroundColorEnum.red - # ) - # Console.write_line(f'You selected: {selected}') - # # test_console() - # - # Console.write_line() + opts = ["Option 1", "Option 2", "Option 3", "Option 4"] + selected = Console.select( + ">", + "Select item:", + opts, + header_foreground_color=ForegroundColorEnum.blue, + option_foreground_color=ForegroundColorEnum.green, + cursor_foreground_color=ForegroundColorEnum.red, + ) + Console.write_line(f"You selected: {selected}") + + Console.write_line()